Introduce negative predicate

This commit is contained in:
Artur Beljajev 2018-08-24 14:14:29 +03:00
parent 9d74cd5673
commit a1fb0e2e61
3 changed files with 7 additions and 3 deletions

View file

@ -21,10 +21,10 @@ class NotificationTest < ActiveSupport::TestCase
def test_unread_by_default
notification = Notification.new(registrar: registrars(:bestnames), text: 'test')
assert_not notification.read?
assert notification.unread?
notification.save!
assert_not notification.read?
assert notification.unread?
end
def test_honor_given_read_state