DEV: Add test.

Follow-up to 2f54dd5e3d.
This commit is contained in:
Dan Ungureanu 2019-10-21 21:33:58 +03:00
parent 2f54dd5e3d
commit ceb74bef8f
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84

View File

@ -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) }