Verify no unaccessible contacts are exposed in registrant portal

This commit is contained in:
Karl Erik Õunapuu 2020-09-22 18:04:43 +03:00
parent 552e1e7b1e
commit 83be880281
No known key found for this signature in database
GPG key ID: C9DD647298A34764
2 changed files with 27 additions and 1 deletions

View file

@ -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

View file

@ -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