email validator: fix undeliverable? method always returning false.
`undeliverable?` calls `smtp_enabled?` which we forgot to define. It swallowed the error so it didn't fail but it always returned false.
This commit is contained in:
@@ -2,6 +2,10 @@ require 'test_helper'
|
||||
|
||||
class EmailValidatorTest < ActiveSupport::TestCase
|
||||
context "EmailValidator" do
|
||||
setup do
|
||||
EmailValidator.stubs(:smtp_enabled?).returns(true)
|
||||
end
|
||||
|
||||
context "#undeliverable?" do
|
||||
should "return good addresses as deliverable" do
|
||||
assert_equal(false, EmailValidator.undeliverable?("webmaster@danbooru.donmai.us"))
|
||||
|
||||
Reference in New Issue
Block a user