diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-06-11 14:41:33 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-06-11 15:03:32 -0400 |
commit | 832b7a7ca330a38235d9bdecb18fa9dbf4ed156f (patch) | |
tree | 40db7275a422c942317c30ddffdd58a31bda84ce /activerecord/test/cases/associations | |
parent | b05bcb8fef706ef45e2f273040083b1bbd180c6e (diff) | |
download | rails-832b7a7ca330a38235d9bdecb18fa9dbf4ed156f.tar.gz rails-832b7a7ca330a38235d9bdecb18fa9dbf4ed156f.tar.bz2 rails-832b7a7ca330a38235d9bdecb18fa9dbf4ed156f.zip |
Don't use `target=`
It mark the association as loaded and this can cause the object to be in
an stale state.
Diffstat (limited to 'activerecord/test/cases/associations')
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 259e4eb4b7..d5573b6d02 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -357,7 +357,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase posts(:welcome).people.delete(people(:michael)) end - assert_queries(0) do + assert_queries(1) do assert_empty posts(:welcome).people end |