mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Update test name to reflect change in how scopes merging works
Introduced inf1082b8588
. Full changelog in9f007d7fe5
. [ci skip]
This commit is contained in:
parent
9f007d7fe5
commit
9588924440
2 changed files with 2 additions and 3 deletions
|
@ -167,7 +167,6 @@ module ActiveRecord
|
|||
scope = relation.merge(scope)
|
||||
scope.default_scoped = default_scoped
|
||||
end
|
||||
|
||||
else
|
||||
scope = body
|
||||
end
|
||||
|
|
|
@ -309,7 +309,7 @@ class NamedScopeTest < ActiveRecord::TestCase
|
|||
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 @@ class NamedScopeTest < ActiveRecord::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue