aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/inner_join_association_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/associations/inner_join_association_test.rb')
-rw-r--r--activerecord/test/cases/associations/inner_join_association_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/associations/inner_join_association_test.rb b/activerecord/test/cases/associations/inner_join_association_test.rb
index 7be875fec6..be0f5714f3 100644
--- a/activerecord/test/cases/associations/inner_join_association_test.rb
+++ b/activerecord/test/cases/associations/inner_join_association_test.rb
@@ -115,19 +115,19 @@ class InnerJoinAssociationTest < ActiveRecord::TestCase
scope = Post.joins(:special_comments).where(id: posts(:sti_comments).id)
# The join should match SpecialComment and its subclasses only
- assert scope.where("comments.type" => "Comment").empty?
- assert !scope.where("comments.type" => "SpecialComment").empty?
- assert !scope.where("comments.type" => "SubSpecialComment").empty?
+ assert_predicate scope.where("comments.type" => "Comment"), :empty?
+ assert_not_predicate scope.where("comments.type" => "SpecialComment"), :empty?
+ assert_not_predicate scope.where("comments.type" => "SubSpecialComment"), :empty?
end
def test_find_with_conditions_on_reflection
- assert !posts(:welcome).comments.empty?
+ assert_not_predicate posts(:welcome).comments, :empty?
assert Post.joins(:nonexistent_comments).where(id: posts(:welcome).id).empty? # [sic!]
end
def test_find_with_conditions_on_through_reflection
- assert !posts(:welcome).tags.empty?
- assert Post.joins(:misc_tags).where(id: posts(:welcome).id).empty?
+ assert_not_predicate posts(:welcome).tags, :empty?
+ assert_predicate Post.joins(:misc_tags).where(id: posts(:welcome).id), :empty?
end
test "the default scope of the target is applied when joining associations" do