diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-19 10:27:39 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-19 10:27:39 -0300 |
commit | e295d61d6d4f13aee08c895751277531edb39993 (patch) | |
tree | fce2b9df88a3d03978d603fb9ad1b62da2272009 /test | |
parent | 61b2d2242208ac9997ff6b73d92d3fc6c26f2171 (diff) | |
parent | 97bfc5b7328e1d2bc54b4592c931a2dcee9b7926 (diff) | |
download | rails-e295d61d6d4f13aee08c895751277531edb39993.tar.gz rails-e295d61d6d4f13aee08c895751277531edb39993.tar.bz2 rails-e295d61d6d4f13aee08c895751277531edb39993.zip |
Merge pull request #271 from jordansexton/patch-2
Added update and delete convenience methods
Diffstat (limited to 'test')
-rw-r--r-- | test/test_table.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_table.rb b/test/test_table.rb index 286ad10167..14256475ec 100644 --- a/test/test_table.rb +++ b/test/test_table.rb @@ -67,6 +67,22 @@ module Arel end end + describe 'update_manager' do + it 'should return an update manager' do + um = @relation.update_manager + assert_kind_of Arel::UpdateManager, um + assert_equal um.engine, @relation.engine + end + end + + describe 'delete_manager' do + it 'should return a delete manager' do + dm = @relation.delete_manager + assert_kind_of Arel::DeleteManager, dm + assert_equal dm.engine, @relation.engine + end + end + describe 'having' do it 'adds a having clause' do mgr = @relation.having @relation[:id].eq(10) |