aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-05-27 14:25:01 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-05-27 14:25:01 -0700
commit593002080cbcbb6e14acf3bc909aab819811f215 (patch)
tree40c61fb51f9583c7eeaa3a2f6bbb7dedac156af4 /test
parent58c3d1d56cf38aebf09e64803441b606680b680a (diff)
parent00d1482fefa1cf9c3753b58f4fe9b580c52ae935 (diff)
downloadrails-593002080cbcbb6e14acf3bc909aab819811f215.tar.gz
rails-593002080cbcbb6e14acf3bc909aab819811f215.tar.bz2
rails-593002080cbcbb6e14acf3bc909aab819811f215.zip
Merge pull request #55 from samuelkadolph/add_predicates_to_function_node
Include Arel::Predicates to Arel::Nodes::Function
Diffstat (limited to 'test')
-rw-r--r--test/nodes/test_count.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/nodes/test_count.rb b/test/nodes/test_count.rb
index afa423e8f5..be53b86855 100644
--- a/test/nodes/test_count.rb
+++ b/test/nodes/test_count.rb
@@ -15,4 +15,13 @@ describe Arel::Nodes::Count do
}
end
end
+
+ describe "eq" do
+ it "should compare the count" do
+ table = Arel::Table.new :users
+ table[:id].count.eq(2).to_sql.must_be_like %{
+ COUNT("users"."id") = 2
+ }
+ end
+ end
end