diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-08 15:29:22 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-08 15:29:22 -0700 |
commit | cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3 (patch) | |
tree | 08ab278f12e785b43de8cec436d3cacaead8c875 /spec/arel | |
parent | 7b122f9a336c8c780dcc5a29074f17f3ec493dc6 (diff) | |
download | rails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.tar.gz rails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.tar.bz2 rails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.zip |
adding having nodes
Diffstat (limited to 'spec/arel')
-rw-r--r-- | spec/arel/table_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb index e67c371577..46d9dbddf4 100644 --- a/spec/arel/table_spec.rb +++ b/spec/arel/table_spec.rb @@ -6,6 +6,15 @@ module Arel @relation = Table.new(:users) end + describe 'having' do + it 'adds a having clause' do + mgr = @relation.having @relation[:id].eq(10) + mgr.to_sql.should be_like %{ + SELECT FROM "users" HAVING "users"."id" = 10 + } + end + end + describe 'backwards compat' do describe 'joins' do it 'returns nil' do |