aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-11-09 15:55:33 -0500
committerGitHub <noreply@github.com>2017-11-09 15:55:33 -0500
commit1c6db52412a7c503a9eda529fe0913187b018bb2 (patch)
tree013c822ca2408617fc7975dc3f384301401f4bbe /activerecord/test/cases/associations
parent100c62ae15deb3d70c5e17d880fd57971bb8759a (diff)
parentae6361b88c58c5dc1e86833e0299d031bb573fe1 (diff)
downloadrails-1c6db52412a7c503a9eda529fe0913187b018bb2.tar.gz
rails-1c6db52412a7c503a9eda529fe0913187b018bb2.tar.bz2
rails-1c6db52412a7c503a9eda529fe0913187b018bb2.zip
Merge pull request #25346 from bogdan/correct-tags-count-in-fixtures
Set counter caches to correct values in fixtures
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r--activerecord/test/cases/associations/cascaded_eager_loading_test.rb2
-rw-r--r--activerecord/test/cases/associations/has_many_associations_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
index e69cfe5e52..829e12fbc8 100644
--- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
+++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
@@ -37,7 +37,7 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase
def test_eager_association_loading_with_hmt_does_not_table_name_collide_when_joining_associations
authors = Author.joins(:posts).eager_load(:comments).where(posts: { tags_count: 1 }).to_a
- assert_equal 1, assert_no_queries { authors.size }
+ assert_equal 3, assert_no_queries { authors.size }
assert_equal 10, assert_no_queries { authors[0].comments.size }
end
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb
index 6bd11a5d81..4ca11af791 100644
--- a/activerecord/test/cases/associations/has_many_associations_test.rb
+++ b/activerecord/test/cases/associations/has_many_associations_test.rb
@@ -831,7 +831,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase
end
def test_find_scoped_grouped_having
- assert_equal 1, authors(:david).popular_grouped_posts.length
+ assert_equal 2, authors(:david).popular_grouped_posts.length
assert_equal 0, authors(:mary).popular_grouped_posts.length
end