diff options
author | Mack Earnhardt <mack@agilereasoning.com> | 2013-03-16 12:32:07 -0400 |
---|---|---|
committer | Mack Earnhardt <mack@agilereasoning.com> | 2013-03-17 02:11:19 -0400 |
commit | 1d6eabb67758dd607f8cbcd38da76eb2c9146844 (patch) | |
tree | 02e3644bb298c558bf79df1bc20a6c01d0266ee2 /activerecord/test/cases/counter_cache_test.rb | |
parent | 077031691df0070be39a965a7eee07a9e5b1c4fe (diff) | |
download | rails-1d6eabb67758dd607f8cbcd38da76eb2c9146844.tar.gz rails-1d6eabb67758dd607f8cbcd38da76eb2c9146844.tar.bz2 rails-1d6eabb67758dd607f8cbcd38da76eb2c9146844.zip |
Refactor Person/Friendship relationships to be more intuitive
PR #5210 added a Friendship model to illustrate a bug, but in doing so
created a confusing structure because both belongs_to declarations in
Friendship referred to the same side of the join. The new structure
maintains the integrity of the bug test while changing the follower
relationship to be more useful for other testing.
Diffstat (limited to 'activerecord/test/cases/counter_cache_test.rb')
-rw-r--r-- | activerecord/test/cases/counter_cache_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/counter_cache_test.rb b/activerecord/test/cases/counter_cache_test.rb index 7de2ceae88..7d06fb5093 100644 --- a/activerecord/test/cases/counter_cache_test.rb +++ b/activerecord/test/cases/counter_cache_test.rb @@ -118,7 +118,7 @@ class CounterCacheTest < ActiveRecord::TestCase test "reset the right counter if two have the same foreign key" do michael = people(:michael) assert_nothing_raised(ActiveRecord::StatementInvalid) do - Person.reset_counters(michael.id, :followers) + Person.reset_counters(michael.id, :friends_too) end end |