updated tests

This commit is contained in:
olegphenomenon 2022-01-12 13:11:10 +02:00
parent 635e7b9c4f
commit fff7bcb1cf
2 changed files with 8 additions and 6 deletions

View file

@ -66,10 +66,6 @@ if @cron_group == 'registry'
rake 'verify_email:all_domains'
end
every 5.minutes do
runner 'NameserverRecordValidationJob.perform_now'
end
# Should be at least once every 4 days, since according to LHV specs:
# "Unread messages older than 5 days are automatically scheduled for deletion"
# https://partners.lhv.ee/en/connect/#messaging

View file

@ -13,8 +13,14 @@ class ContactNotificationTest < ActionMailer::TestCase
end
end
def test_notify_tech_contacts
ContactNotification.notify_tech_contact(domain: @domain, text: @text)
def test_notify_tech_contacts_that_nameserver_is_broken
ContactNotification.notify_tech_contact(domain: @domain, reason: 'nameserver')
assert_equal @domain.tech_contacts.count, 2
assert_emails 2
end
def test_notify_tech_contacts_that_dnssec_is_broken
ContactNotification.notify_tech_contact(domain: @domain, reason: 'dnssec')
assert_equal @domain.tech_contacts.count, 2
assert_emails 2
end