From e59d1354e8c2983aba64dbf3dd83f03d3845ceb9 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Tue, 12 Jul 2016 23:21:50 +0530 Subject: Fix random test failure of test_create_resets_cached_counters - In earlier commit, I removed setting id manually for readers fixtures but that did not fix the randomly failing test_create_resets_cached_counters from has_many_associations tests. - Because the problem was with the `person_id` of the readers. As it is set to 1 in fixtures, if a post gets created with id 1 then that post automatically has 2 readers. - Fixed by removing the person_id. --- activerecord/test/fixtures/readers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/test') diff --git a/activerecord/test/fixtures/readers.yml b/activerecord/test/fixtures/readers.yml index d8df05f7fc..af5f888e4b 100644 --- a/activerecord/test/fixtures/readers.yml +++ b/activerecord/test/fixtures/readers.yml @@ -1,9 +1,9 @@ michael_welcome: post_id: 1 - person_id: 1 + person: michael first_post_id: 2 michael_authorless: post_id: 3 - person_id: 1 + person: michael first_post_id: 3 -- cgit v1.2.3