diff options
author | Keenan Brock <keenan@thebrocks.net> | 2015-12-05 20:23:48 -0500 |
---|---|---|
committer | Keenan Brock <keenan@thebrocks.net> | 2015-12-05 20:23:48 -0500 |
commit | 725cf0502eb279c728bd93320cc5e22134228ff1 (patch) | |
tree | cea78b06495af32c84f7fa34f4cc104b6cb3c1bf /test | |
parent | d2e6be1677b124b3eef5b3ebe0fd4a0d31d8a2bf (diff) | |
download | rails-725cf0502eb279c728bd93320cc5e22134228ff1.tar.gz rails-725cf0502eb279c728bd93320cc5e22134228ff1.tar.bz2 rails-725cf0502eb279c728bd93320cc5e22134228ff1.zip |
test match predicate case sensitivity attribute
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_postgres.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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%' } |