mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
DEV: Replace 'processed' column on notifications with new table (#11864)
This commit is contained in:

committed by
GitHub

parent
60f10e9067
commit
809274fe0d
@ -44,13 +44,14 @@ describe DoNotDisturbController do
|
||||
end
|
||||
|
||||
describe "#destroy" do
|
||||
it "process notifications that came in during DND" do
|
||||
it "process shelved notifications that came in during DND" do
|
||||
user.do_not_disturb_timings.create(starts_at: 2.days.ago, ends_at: 2.days.from_now)
|
||||
notification = Notification.create(read: false, user_id: user.id, topic_id: 2, post_number: 1, data: '{}', notification_type: 1)
|
||||
|
||||
expect(notification.processed).to eq(false)
|
||||
expect(notification.shelved_notification).to be_present
|
||||
delete "/do-not-disturb.json"
|
||||
expect(notification.reload.processed).to eq(true)
|
||||
expect { notification.shelved_notification.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
||||
expect(user.do_not_disturb?).to eq(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user