mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FEATURE: clearer error message when receiving a reply to an old notification
This commit is contained in:
@ -78,6 +78,13 @@ describe Email::Receiver do
|
||||
expect { process(:bad_destinations) }.to raise_error(Email::Receiver::BadDestinationAddress)
|
||||
end
|
||||
|
||||
it "raises an OldDestinationError when notification is too old" do
|
||||
topic = Fabricate(:topic, id: 424242)
|
||||
post = Fabricate(:post, topic: topic, id: 123456, created_at: 1.year.ago)
|
||||
|
||||
expect { process(:old_destination) }.to raise_error(Email::Receiver::OldDestinationError)
|
||||
end
|
||||
|
||||
it "raises a BouncerEmailError when email is a bounced email" do
|
||||
expect { process(:bounced_email) }.to raise_error(Email::Receiver::BouncedEmailError)
|
||||
expect(IncomingEmail.last.is_bounce).to eq(true)
|
||||
|
Reference in New Issue
Block a user