From fff7bcb1cff04330e38ee7c4f49eeb1a4207931a Mon Sep 17 00:00:00 2001 From: olegphenomenon Date: Wed, 12 Jan 2022 13:11:10 +0200 Subject: [PATCH] updated tests --- config/schedule.rb | 4 ---- test/services/contact_notification_test.rb | 10 ++++++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config/schedule.rb b/config/schedule.rb index cffe61d37..0106cc97d 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -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 diff --git a/test/services/contact_notification_test.rb b/test/services/contact_notification_test.rb index 317cbb470..0e75fb548 100644 --- a/test/services/contact_notification_test.rb +++ b/test/services/contact_notification_test.rb @@ -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