mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 20:44:10 +08:00
DEV: Add test.
Follow-up to 2f54dd5e3d22e88ef18c3767ffbc1ef5eb0e04f8.
This commit is contained in:
parent
2f54dd5e3d
commit
ceb74bef8f
@ -128,6 +128,12 @@ describe Notification do
|
||||
Fabricate(:notification)
|
||||
end
|
||||
|
||||
it 'works for partial model instances' do
|
||||
NotificationEmailer.disable
|
||||
partial_user = User.select(:id).find_by(id: Fabricate(:user).id)
|
||||
partial_user.notifications.create!(notification_type: Notification.types[:mentioned], data: '{}')
|
||||
end
|
||||
|
||||
context 'destroy' do
|
||||
let!(:notification) { Fabricate(:notification) }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user