Skip to content

Commit

Permalink
Add test for scope changes on add_new_at set to nil
Browse files Browse the repository at this point in the history
  • Loading branch information
greatghoul committed Jul 8, 2016
1 parent 3c60fe2 commit 36158f9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/shared_no_addition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 36158f9

Please sign in to comment.