From 725cf0502eb279c728bd93320cc5e22134228ff1 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Sat, 5 Dec 2015 20:23:48 -0500 Subject: test match predicate case sensitivity attribute --- test/visitors/test_postgres.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/visitors') diff --git a/test/visitors/test_postgres.rb b/test/visitors/test_postgres.rb index 5901c56968..4b7dbe367f 100644 --- a/test/visitors/test_postgres.rb +++ b/test/visitors/test_postgres.rb @@ -53,6 +53,8 @@ module Arel describe "Nodes::Matches" do it "should know how to visit" do node = @table[:name].matches('foo%') + node.must_be_kind_of Nodes::Matches + node.case_sensitive.must_equal(false) compile(node).must_be_like %{ "users"."name" ILIKE 'foo%' } @@ -60,6 +62,7 @@ module Arel it "should know how to visit case sensitive" do node = @table[:name].matches('foo%', nil, true) + node.case_sensitive.must_equal(true) compile(node).must_be_like %{ "users"."name" LIKE 'foo%' } @@ -84,6 +87,8 @@ module Arel describe "Nodes::DoesNotMatch" do it "should know how to visit" do node = @table[:name].does_not_match('foo%') + node.must_be_kind_of Nodes::DoesNotMatch + node.case_sensitive.must_equal(false) compile(node).must_be_like %{ "users"."name" NOT ILIKE 'foo%' } @@ -91,6 +96,7 @@ module Arel it "should know how to visit case sensitive" do node = @table[:name].does_not_match('foo%', nil, true) + node.case_sensitive.must_equal(true) compile(node).must_be_like %{ "users"."name" NOT LIKE 'foo%' } -- cgit v1.2.3