diff --git a/test/jobs/domain_update_confirm_job_test.rb b/test/jobs/domain_update_confirm_job_test.rb index ded0d3d8a..51c42aa4f 100644 --- a/test/jobs/domain_update_confirm_job_test.rb +++ b/test/jobs/domain_update_confirm_job_test.rb @@ -1,5 +1,4 @@ require "test_helper" - class DomainUpdateConfirmJobTest < ActiveSupport::TestCase def setup super @@ -19,6 +18,22 @@ class DomainUpdateConfirmJobTest < ActiveSupport::TestCase super end + def test_registrant_locked_domain + refute @domain.locked_by_registrant? + @domain.apply_registry_lock + assert @domain.locked_by_registrant? + assert_equal(@domain.registrar.notifications.last.text, 'Domain has been locked by registrant') + end + + def test_registrant_unlocked_domain + refute @domain.locked_by_registrant? + @domain.apply_registry_lock + assert @domain.locked_by_registrant? + @domain.remove_registry_lock + refute @domain.locked_by_registrant? + assert_equal(@domain.registrar.notifications.last.text, 'Domain has been unlocked by registrant') + end + def test_rejected_registrant_verification_notifies_registrar DomainUpdateConfirmJob.perform_now(@domain.id, RegistrantVerification::REJECTED)