diff --git a/app/interactions/domains/force_delete/notify_registrar.rb b/app/interactions/domains/force_delete/notify_registrar.rb index 5611b1c42..279fac584 100644 --- a/app/interactions/domains/force_delete/notify_registrar.rb +++ b/app/interactions/domains/force_delete/notify_registrar.rb @@ -7,7 +7,11 @@ module Domains def notify_without_email template = if reason == 'invalid_company' - I18n.t('invalid_ident', ident: domain.registrant.ident) + I18n.t('invalid_ident', + ident: domain.registrant.ident, + domain_name: domain.name, + outzone_date: domain.outzone_date, + purge_date: domain.purge_date) else I18n.t('force_delete_set_on_domain', domain_name: domain.name, @@ -22,7 +26,11 @@ module Domains def notify_with_email template = if reason == 'invalid_company' - I18n.t('invalid_ident', ident: domain.registrant.ident) + I18n.t('invalid_ident', + ident: domain.registrant.ident, + domain_name: domain.name, + outzone_date: domain.outzone_date, + purge_date: domain.purge_date) else I18n.t('force_delete_auto_email', domain_name: domain.name, diff --git a/config/locales/en.yml b/config/locales/en.yml index b60caeec7..2f9ba4b15 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -675,7 +675,7 @@ en: actions: Actions contact_has_been_archived: 'Contact with code %{contact_code} has been archieved because it has been orphaned for longer than %{orphan_months} months.' dns_policy_violation: "Data management policy violation: DNSKEY does not match or not found in the authoritative nameservers" - invalid_ident: 'Invalid ident %{ident}' + invalid_ident: 'Force delete set on domain %{domain_name}. Outzone date: %{outzone_date}. Purge date: %{purge_date}. Invalid ident %{ident}' number: currency: diff --git a/config/locales/et.yml b/config/locales/et.yml index b3fe1dc70..f0a9eba83 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -41,4 +41,4 @@ et: ipv6: taken: 'on juba lisatud' - invalid_ident: 'Vigane ident %{ident}' \ No newline at end of file + invalid_ident: 'Jõustatud kustutamine määratud domainile %{domain_name}. Väljaandmise kuupäev: %{outzone_date}. Kustutamise kuupäev: %{purge_date}. Vigane ident %{ident}' diff --git a/test/jobs/company_register_status_job_test.rb b/test/jobs/company_register_status_job_test.rb index df8c04677..aff3785f9 100644 --- a/test/jobs/company_register_status_job_test.rb +++ b/test/jobs/company_register_status_job_test.rb @@ -179,7 +179,13 @@ class CompanyRegisterStatusJobTest < ActiveSupport::TestCase @registrant_acme.reload assert_equal Contact::DELETED, @registrant_acme.company_register_status - assert_equal @registrant_acme.registrant_domains.first.registrar.notifications.last.text, I18n.t('invalid_ident', ident: @registrant_acme.ident) + + template = I18n.t('invalid_ident', + ident: @registrant_acme.ident, + domain_name: @registrant_acme.registrant_domains.first.name, + outzone_date: @registrant_acme.registrant_domains.first.outzone_date, + purge_date: @registrant_acme.registrant_domains.first.purge_date) + assert_equal @registrant_acme.registrant_domains.first.registrar.notifications.last.text, template CompanyRegister::Client.define_singleton_method(:new, original_new_method) end