mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
updated tests
This commit is contained in:
parent
ba48132547
commit
d9f6274258
3 changed files with 73 additions and 89 deletions
|
@ -100,25 +100,6 @@ class VerifyEmailTaskTest < ActiveJob::TestCase
|
|||
# assert_equal ValidationEvent.all.count, 9
|
||||
# end
|
||||
|
||||
def test_should_set_fd_for_failed_email_after_several_times
|
||||
contact = contacts(:john)
|
||||
trumail_results = OpenStruct.new(success: false,
|
||||
email: contact.email,
|
||||
domain: "inbox.tests",
|
||||
errors: {:mx=>"target host(s) not found"},
|
||||
)
|
||||
Spy.on_instance_method(Actions::EmailCheck, :check_email).and_return(trumail_results)
|
||||
|
||||
|
||||
assert_not contact.domains.last.force_delete_scheduled?
|
||||
|
||||
3.times do
|
||||
run_task
|
||||
end
|
||||
|
||||
assert contact.domains.last.force_delete_scheduled?
|
||||
end
|
||||
|
||||
def test_fd_should_not_removed_if_change_email_to_another_invalid_one
|
||||
contact = contacts(:john)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue