diff --git a/test/shared_no_addition.rb b/test/shared_no_addition.rb index 5a7beb1e..1f22fb74 100644 --- a/test/shared_no_addition.rb +++ b/test/shared_no_addition.rb @@ -21,5 +21,16 @@ def test_update_does_not_add_to_list assert !new.in_list? end + def test_update_scope_does_not_add_to_list + new = NoAdditionMixin.create + + new.update_attribute(:parent_id, 20) + new.reload + assert !new.in_list? + + new.update_attribute(:parent_id, 5) + new.reload + assert !new.in_list? + end end end