Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update test name to reflect change in how scopes merging works

Introduced in f1082b8.
Full changelog in 9f007d7.

[ci skip]
  • Loading branch information...
commit 958892444067fcd522920bd1b4ae02ec133b5cdd 1 parent 9f007d7
@carlosantoniodasilva carlosantoniodasilva authored
View
1  activerecord/lib/active_record/scoping/named.rb
@@ -167,7 +167,6 @@ def scope(name, body, &block)
scope = relation.merge(scope)
scope.default_scoped = default_scoped
end
-
else
scope = body
end
View
4 activerecord/test/cases/named_scope_test.rb
@@ -309,7 +309,7 @@ def test_chaining_with_duplicate_joins
assert_equal post.comments.size, Post.joins(join).joins(join).where("posts.id = #{post.id}").size
end
- def test_chaining_should_use_latest_conditions_when_creating
+ def test_chaining_applies_last_conditions_when_creating
post = Topic.rejected.new
assert !post.approved?
@@ -323,7 +323,7 @@ def test_chaining_should_use_latest_conditions_when_creating
assert post.approved?
end
- def test_chaining_should_use_latest_conditions_when_searching
+ def test_chaining_combines_conditions_when_searching
# Normal hash conditions
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
Please sign in to comment.
Something went wrong with that request. Please try again.