mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Update all does not trigger callbacks.
This commit is contained in:
@ -222,7 +222,7 @@ describe Notification do
|
||||
end
|
||||
Notification.create!(read: true, user_id: user.id, topic_id: 2, post_number: 4, data: '{}', notification_type: 1)
|
||||
|
||||
expect(Notification.mark_posts_read(user,2,[1,2,3,4])).to eq(3)
|
||||
expect { Notification.mark_posts_read(user,2,[1,2,3,4]) }.to change { Notification.where(read: true).count }.by(3)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user