aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2016-07-12 23:21:50 +0530
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-26 22:54:55 -0700
commite59d1354e8c2983aba64dbf3dd83f03d3845ceb9 (patch)
tree64374892863c423e65466d36a9f6db037f25a6a5 /activerecord/test
parent16ef8482699f3c23eb7c01123779484bdbfa2fa0 (diff)
downloadrails-e59d1354e8c2983aba64dbf3dd83f03d3845ceb9.tar.gz
rails-e59d1354e8c2983aba64dbf3dd83f03d3845ceb9.tar.bz2
rails-e59d1354e8c2983aba64dbf3dd83f03d3845ceb9.zip
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.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/fixtures/readers.yml4
1 files changed, 2 insertions, 2 deletions
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