diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2014-10-24 18:46:24 -0500 |
---|---|---|
committer | Sean Griffin <sean@seantheprogrammer.com> | 2014-10-24 18:46:24 -0500 |
commit | 2347f153b1303e32811e4aef69ddf81771b25ac5 (patch) | |
tree | 713549befd4faf76da6e9480bb8d15a927597426 /test | |
parent | b0f1aca66c83548ceeb428c91d89fd120cd5d7d2 (diff) | |
parent | 51f48f0ed9ec84fd12584b750609a2f7e945b945 (diff) | |
download | rails-2347f153b1303e32811e4aef69ddf81771b25ac5.tar.gz rails-2347f153b1303e32811e4aef69ddf81771b25ac5.tar.bz2 rails-2347f153b1303e32811e4aef69ddf81771b25ac5.zip |
Merge pull request #331 from sgrif/sg-in-should-not-break-queries
`#not_in` with a range should respect proper precedence
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_to_sql.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/visitors/test_to_sql.rb b/test/visitors/test_to_sql.rb index abd8cfe356..62e1c57c73 100644 --- a/test/visitors/test_to_sql.rb +++ b/test/visitors/test_to_sql.rb @@ -480,16 +480,16 @@ module Arel it 'can handle two dot ranges' do node = @attr.not_in 1..3 - compile(node).must_be_like %{ - "users"."id" < 1 OR "users"."id" > 3 - } + compile(node).must_equal( + %{("users"."id" < 1 OR "users"."id" > 3)} + ) end it 'can handle three dot ranges' do node = @attr.not_in 1...3 - compile(node).must_be_like %{ - "users"."id" < 1 OR "users"."id" >= 3 - } + compile(node).must_equal( + %{("users"."id" < 1 OR "users"."id" >= 3)} + ) end it 'can handle ranges bounded by infinity' do |