mirror of
https://github.com/internetee/registry.git
synced 2025-07-30 14:36:22 +02:00
added test
This commit is contained in:
parent
1b8640966c
commit
736d935e3e
5 changed files with 27 additions and 8 deletions
|
@ -54,20 +54,22 @@ class VerifyEmailTaskTest < ActiveJob::TestCase
|
|||
end
|
||||
|
||||
def test_should_verify_contact_email_which_was_not_verified
|
||||
|
||||
assert_equal ValidationEvent.count, 0
|
||||
|
||||
|
||||
run_task
|
||||
|
||||
|
||||
assert_equal ValidationEvent.count, Contact.count - 1
|
||||
assert_equal Contact.count, 9
|
||||
|
||||
|
||||
assert_difference 'Contact.count', 1 do
|
||||
create_valid_contact
|
||||
end
|
||||
|
||||
assert_difference 'ValidationEvent.where(success: true).count', 1 do
|
||||
run_task
|
||||
end
|
||||
# Validation email of new contact will be skipped because it validated in during create
|
||||
# assert_difference 'ValidationEvent.where(success: true).count', 1 do
|
||||
# run_task
|
||||
# end
|
||||
end
|
||||
|
||||
def test_fd_should_not_be_removed_if_email_changed_to_another_invalid_one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue