Add ScreenedUrl. Rename BlockedEmail to ScreenedEmail.

This commit is contained in:
Neil Lalonde
2013-08-14 11:05:53 -04:00
parent 8fa9c51bf4
commit 86647f0a54
23 changed files with 251 additions and 90 deletions

View File

@ -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