aboutsummaryrefslogtreecommitdiffstats
path: root/test/visitors/test_postgres.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/visitors/test_postgres.rb')
-rw-r--r--test/visitors/test_postgres.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/visitors/test_postgres.rb b/test/visitors/test_postgres.rb
index d6de216d91..d00aa1c100 100644
--- a/test/visitors/test_postgres.rb
+++ b/test/visitors/test_postgres.rb
@@ -58,6 +58,13 @@ module Arel
}
end
+ it "should know how to visit case sensitive" do
+ node = @table[:name].matches('foo%', nil, true)
+ compile(node).must_be_like %{
+ "users"."name" LIKE 'foo%'
+ }
+ end
+
it "can handle ESCAPE" do
node = @table[:name].matches('foo!%', '!')
compile(node).must_be_like %{
@@ -82,6 +89,13 @@ module Arel
}
end
+ it "should know how to visit case sensitive" do
+ node = @table[:name].does_not_match('foo%', nil, true)
+ compile(node).must_be_like %{
+ "users"."name" NOT LIKE 'foo%'
+ }
+ end
+
it "can handle ESCAPE" do
node = @table[:name].does_not_match('foo!%', '!')
compile(node).must_be_like %{