mirror of
https://github.com/internetee/registry.git
synced 2025-06-12 23:54:44 +02:00
Fix tests
This commit is contained in:
parent
9f9606aba0
commit
7c7213c337
2 changed files with 10 additions and 6 deletions
2
test/fixtures/contacts.yml
vendored
2
test/fixtures/contacts.yml
vendored
|
@ -1,6 +1,7 @@
|
||||||
john:
|
john:
|
||||||
name: John
|
name: John
|
||||||
email: john@inbox.test
|
email: john@inbox.test
|
||||||
|
email_history: john@inbox.test
|
||||||
phone: '+555.555'
|
phone: '+555.555'
|
||||||
ident: 1234
|
ident: 1234
|
||||||
ident_type: priv
|
ident_type: priv
|
||||||
|
@ -18,6 +19,7 @@ john:
|
||||||
william: &william
|
william: &william
|
||||||
name: William
|
name: William
|
||||||
email: william@inbox.test
|
email: william@inbox.test
|
||||||
|
email_history: william@inbox.test
|
||||||
phone: '+555.555'
|
phone: '+555.555'
|
||||||
fax: '+666.6'
|
fax: '+666.6'
|
||||||
ident: 12345
|
ident: 12345
|
||||||
|
|
|
@ -417,12 +417,16 @@ class ForceDeleteTest < ActionMailer::TestCase
|
||||||
assert_not domain.force_delete_scheduled?
|
assert_not domain.force_delete_scheduled?
|
||||||
travel_to Time.zone.parse('2010-07-05')
|
travel_to Time.zone.parse('2010-07-05')
|
||||||
email_1 = '`@internet.ee'
|
email_1 = '`@internet.ee'
|
||||||
asserted_text = "Invalid email: #{email_1}"
|
email_2 = '`@internet2.ee'
|
||||||
|
asserted_text = "Invalid email: #{email_2}"
|
||||||
|
|
||||||
Truemail.configure.default_validation_type = :regex
|
Truemail.configure.default_validation_type = :regex
|
||||||
|
|
||||||
contact_first = domain.admin_contacts.first
|
contact_first = domain.admin_contacts.first
|
||||||
contact_first.update_attribute(:email, email_1)
|
old_email = contact_first.email
|
||||||
|
contact_first.update(
|
||||||
|
email: email_1,
|
||||||
|
email_history: old_email)
|
||||||
|
|
||||||
ValidationEvent::VALID_EVENTS_COUNT_THRESHOLD.times do
|
ValidationEvent::VALID_EVENTS_COUNT_THRESHOLD.times do
|
||||||
contact_first.verify_email
|
contact_first.verify_email
|
||||||
|
@ -431,7 +435,6 @@ class ForceDeleteTest < ActionMailer::TestCase
|
||||||
assert contact_first.email_verification_failed?
|
assert contact_first.email_verification_failed?
|
||||||
|
|
||||||
domain.reload
|
domain.reload
|
||||||
email_2 = '`@internet2.ee'
|
|
||||||
contact_second = domain.admin_contacts.last
|
contact_second = domain.admin_contacts.last
|
||||||
contact_second.update_attribute(:email, email_2)
|
contact_second.update_attribute(:email, email_2)
|
||||||
|
|
||||||
|
@ -447,9 +450,8 @@ class ForceDeleteTest < ActionMailer::TestCase
|
||||||
email_history: email_1
|
email_history: email_1
|
||||||
)
|
)
|
||||||
|
|
||||||
ValidationEvent::VALID_EVENTS_COUNT_THRESHOLD.times do
|
contact_first.verify_email
|
||||||
contact_first.verify_email
|
assert contact_first.need_to_lift_force_delete?
|
||||||
end
|
|
||||||
|
|
||||||
domain.reload
|
domain.reload
|
||||||
assert domain.force_delete_scheduled?
|
assert domain.force_delete_scheduled?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue