mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
added tests for domain locked notifications
This commit is contained in:
parent
cb330d4f79
commit
5de0645d41
1 changed files with 16 additions and 1 deletions
|
@ -1,5 +1,4 @@
|
||||||
require "test_helper"
|
require "test_helper"
|
||||||
|
|
||||||
class DomainUpdateConfirmJobTest < ActiveSupport::TestCase
|
class DomainUpdateConfirmJobTest < ActiveSupport::TestCase
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
|
@ -19,6 +18,22 @@ class DomainUpdateConfirmJobTest < ActiveSupport::TestCase
|
||||||
super
|
super
|
||||||
end
|
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
|
def test_rejected_registrant_verification_notifies_registrar
|
||||||
DomainUpdateConfirmJob.perform_now(@domain.id, RegistrantVerification::REJECTED)
|
DomainUpdateConfirmJob.perform_now(@domain.id, RegistrantVerification::REJECTED)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue