Destroy NotificationRequests that are dismissed (#31008)
This commit is contained in:
@@ -4,9 +4,7 @@ require 'rails_helper'
|
||||
|
||||
RSpec.describe NotificationRequest do
|
||||
describe '#reconsider_existence!' do
|
||||
subject { Fabricate(:notification_request, dismissed: dismissed) }
|
||||
|
||||
let(:dismissed) { false }
|
||||
subject { Fabricate(:notification_request) }
|
||||
|
||||
context 'when there are remaining notifications' do
|
||||
before do
|
||||
@@ -28,14 +26,6 @@ RSpec.describe NotificationRequest do
|
||||
subject.reconsider_existence!
|
||||
end
|
||||
|
||||
context 'when dismissed' do
|
||||
let(:dismissed) { true }
|
||||
|
||||
it 'leaves request intact' do
|
||||
expect(subject.destroyed?).to be false
|
||||
end
|
||||
end
|
||||
|
||||
it 'removes the request' do
|
||||
expect(subject.destroyed?).to be true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user