diff options
Diffstat (limited to 'test/attributes/test_attribute.rb')
-rw-r--r-- | test/attributes/test_attribute.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/attributes/test_attribute.rb b/test/attributes/test_attribute.rb index 0f6d6e447b..4e55069df4 100644 --- a/test/attributes/test_attribute.rb +++ b/test/attributes/test_attribute.rb @@ -330,7 +330,7 @@ module Arel relation[:id].maximum.must_be_kind_of Nodes::Max end - it 'should generate the proper SQL' do + it 'should generate proper SQL' do relation = Table.new(:users) mgr = relation.project relation[:id].maximum mgr.to_sql.must_be_like %{ @@ -345,6 +345,15 @@ module Arel relation = Table.new(:users) relation[:id].minimum.must_be_kind_of Nodes::Min end + + it 'should generate proper SQL' do + relation = Table.new(:users) + mgr = relation.project relation[:id].minimum + mgr.to_sql.must_be_like %{ + SELECT MIN("users"."id") + FROM "users" + } + end end describe '#sum' do |