mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
Add ScreenedUrl. Rename BlockedEmail to ScreenedEmail.
This commit is contained in:
@ -8,13 +8,13 @@ describe EmailValidator do
|
||||
|
||||
context "blocked email" do
|
||||
it "doesn't add an error when email doesn't match a blocked email" do
|
||||
BlockedEmail.stubs(:should_block?).with(record.email).returns(false)
|
||||
ScreenedEmail.stubs(:should_block?).with(record.email).returns(false)
|
||||
validate
|
||||
record.errors[:email].should_not be_present
|
||||
end
|
||||
|
||||
it "adds an error when email matches a blocked email" do
|
||||
BlockedEmail.stubs(:should_block?).with(record.email).returns(true)
|
||||
ScreenedEmail.stubs(:should_block?).with(record.email).returns(true)
|
||||
validate
|
||||
record.errors[:email].should be_present
|
||||
end
|
||||
|
Reference in New Issue
Block a user