mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:36:40 +08:00
FIX: improve support for handling emails coming from screened email addresses
This commit is contained in:
parent
d086151a78
commit
7d9f2265b9
8 changed files with 63 additions and 27 deletions
|
@ -17,7 +17,12 @@ describe Email::Receiver do
|
|||
expect { Email::Receiver.new("") }.to raise_error(Email::Receiver::EmptyEmailError)
|
||||
end
|
||||
|
||||
it "raises and UserNotFoundError when staged users are disabled" do
|
||||
it "raises a ScreenedEmailError when email address is screened" do
|
||||
ScreenedEmail.expects(:should_block?).with("screened@mail.com").returns(true)
|
||||
expect { process(:screened_email) }.to raise_error(Email::Receiver::ScreenedEmailError)
|
||||
end
|
||||
|
||||
it "raises an UserNotFoundError when staged users are disabled" do
|
||||
SiteSetting.enable_staged_users = false
|
||||
expect { process(:user_not_found) }.to raise_error(Email::Receiver::UserNotFoundError)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue