diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb index 3071a8657..f23085650 100644 --- a/spec/models/notification_spec.rb +++ b/spec/models/notification_spec.rb @@ -187,16 +187,18 @@ describe Notification do it 'correctly updates the read state' do user = Fabricate(:user) + t = Fabricate(:topic) + Notification.create!(read: false, user_id: user.id, - topic_id: 2, + topic_id: t.id, post_number: 1, data: '{}', notification_type: Notification.types[:private_message]) other = Notification.create!(read: false, user_id: user.id, - topic_id: 2, + topic_id: t.id, post_number: 1, data: '{}', notification_type: Notification.types[:mentioned])