diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-08-11 08:14:51 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-08-11 21:47:30 +0100 |
commit | 160917526a8d038d4fbb4d90635e26a9df8d8871 (patch) | |
tree | 422423bd2cd98dcd82928da7c2fb9513d3ef4884 /test/test_update_manager.rb | |
parent | 4f416f44981aff7911de5ac59835339a2967aff7 (diff) | |
download | rails-160917526a8d038d4fbb4d90635e26a9df8d8871.tar.gz rails-160917526a8d038d4fbb4d90635e26a9df8d8871.tar.bz2 rails-160917526a8d038d4fbb4d90635e26a9df8d8871.zip |
add UpdateManager#key method to access the key
Diffstat (limited to 'test/test_update_manager.rb')
-rw-r--r-- | test/test_update_manager.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_update_manager.rb b/test/test_update_manager.rb index 3099fb367e..f9704af425 100644 --- a/test/test_update_manager.rb +++ b/test/test_update_manager.rb @@ -95,5 +95,21 @@ module Arel um.where(table[:id].eq(1)).must_equal um end end + + describe 'key' do + before do + @table = Table.new :users + @um = Arel::UpdateManager.new Table.engine + @um.key = @table[:foo] + end + + it 'can be set' do + @um.ast.key.must_equal @table[:foo] + end + + it 'can be accessed' do + @um.key.must_equal @table[:foo] + end + end end end |