diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-03-08 02:35:06 -0800 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-03-08 02:35:06 -0800 |
commit | f1082b8588a9144eedb34d511f0074031f692d98 (patch) | |
tree | c7771c73870a8afe49b5e2d2b0e21b0f2db85a47 /activerecord/test | |
parent | b67043393b5ed6079989513299fe303ec3bc133b (diff) | |
parent | cd26b6ae7c1546ef8f38302661bbedf8cb487311 (diff) | |
download | rails-f1082b8588a9144eedb34d511f0074031f692d98.tar.gz rails-f1082b8588a9144eedb34d511f0074031f692d98.tar.bz2 rails-f1082b8588a9144eedb34d511f0074031f692d98.zip |
Merge pull request #9553 from neerajdotname/7365-mergin-scopes-and-where
7365 merging scopes for where clauses
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/named_scope_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/named_scope_test.rb b/activerecord/test/cases/named_scope_test.rb index bd121126e7..c067db4cbe 100644 --- a/activerecord/test/cases/named_scope_test.rb +++ b/activerecord/test/cases/named_scope_test.rb @@ -325,11 +325,11 @@ class NamedScopeTest < ActiveRecord::TestCase def test_chaining_should_use_latest_conditions_when_searching # Normal hash conditions - assert_equal Topic.where(:approved => true).to_a, Topic.rejected.approved.to_a - assert_equal Topic.where(:approved => false).to_a, Topic.approved.rejected.to_a + assert_equal Topic.where(approved: false).where(approved: true).to_a, Topic.rejected.approved.to_a + assert_equal Topic.where(approved: true).where(approved: false).to_a, Topic.approved.rejected.to_a # Nested hash conditions with same keys - assert_equal [posts(:sti_comments)], Post.with_special_comments.with_very_special_comments.to_a + assert_equal [], Post.with_special_comments.with_very_special_comments.to_a # Nested hash conditions with different keys assert_equal [posts(:sti_comments)], Post.with_special_comments.with_post(4).to_a.uniq |