Merge pull request #1830 from internetee/1828-send-poll-message-to-registrant-on-applying-and-removing-registry-lock

Registry lock: Notify Registrar by EPP notification
This commit is contained in:
Timo Võhmar 2021-02-11 13:14:44 +02:00 committed by GitHub
commit a3cca9149b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 7 deletions

View file

@ -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 #{@domain.name} 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 #{@domain.name} has been unlocked by registrant")
end
def test_rejected_registrant_verification_notifies_registrar
DomainUpdateConfirmJob.perform_now(@domain.id, RegistrantVerification::REJECTED)