mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
Verify no unaccessible contacts are exposed in registrant portal
This commit is contained in:
parent
552e1e7b1e
commit
83be880281
2 changed files with 27 additions and 1 deletions
12
test/fixtures/contacts.yml
vendored
12
test/fixtures/contacts.yml
vendored
|
@ -78,6 +78,18 @@ identical_to_william:
|
|||
auth_info: 5ab865
|
||||
uuid: c0a191d5-3793-4f0b-8f85-491612d0293e
|
||||
|
||||
registrar_ltd:
|
||||
name: Registrar Ltd
|
||||
email: registrar@inbox.test
|
||||
phone: '+555.555'
|
||||
ident: 1234567890
|
||||
ident_type: org
|
||||
registrar: goodnames
|
||||
ident_country_code: US
|
||||
code: registrarltd-001
|
||||
auth_info: e2c441
|
||||
uuid: 28b65455-6f1a-49fd-961c-0758886dbd76
|
||||
|
||||
invalid:
|
||||
name: any
|
||||
code: invalid
|
||||
|
|
|
@ -28,6 +28,20 @@ class RegistrantAreaDomainListTest < ApplicationSystemTestCase
|
|||
assert_no_text 'metro.test'
|
||||
end
|
||||
|
||||
def test_only_shows_direct_relation_and_or_company_domains
|
||||
# case https://github.com/internetee/registry/issues/1690
|
||||
tech_contact = contacts(:registrar_ltd)
|
||||
|
||||
# All domains share the same tech contact object
|
||||
Domain.all.each do |domain|
|
||||
DomainContact.create(domain: domain, contact: tech_contact, type: TechDomainContact)
|
||||
end
|
||||
|
||||
visit registrant_domains_url
|
||||
assert_no_text 'Company register is unavailable.'
|
||||
assert_no_text 'metro.test'
|
||||
end
|
||||
|
||||
def test_notification_when_company_register_is_unavailable
|
||||
CompanyRegister::Client.stub(:new, CompanyRegisterClientStub.new) do
|
||||
visit registrant_domains_url
|
||||
|
@ -54,4 +68,4 @@ class RegistrantAreaDomainListTest < ApplicationSystemTestCase
|
|||
|
||||
assert_text 'shop.test'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue