aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-08 15:29:22 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-08 15:29:22 -0700
commitcb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3 (patch)
tree08ab278f12e785b43de8cec436d3cacaead8c875 /spec
parent7b122f9a336c8c780dcc5a29074f17f3ec493dc6 (diff)
downloadrails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.tar.gz
rails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.tar.bz2
rails-cb6d13877c8d85bd7ba7f7286dfc8b5ae98a50b3.zip
adding having nodes
Diffstat (limited to 'spec')
-rw-r--r--spec/arel/table_spec.rb9
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