mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-03 00:12:16 +02:00
wip
This commit is contained in:
parent
70faa6beb9
commit
d3a3565336
2 changed files with 14 additions and 2 deletions
|
@ -1105,6 +1105,9 @@ class TestWithDomainPermissions(TestWithUser):
|
|||
self.domain_just_nameserver, _ = Domain.objects.get_or_create(
|
||||
name="justnameserver.com"
|
||||
)
|
||||
self.domain_no_information, _ = Domain.objects.get_or_create(
|
||||
name="noinformation.gov"
|
||||
)
|
||||
|
||||
self.domain_dsdata, _ = Domain.objects.get_or_create(name="dnssec-dsdata.gov")
|
||||
self.domain_multdsdata, _ = Domain.objects.get_or_create(
|
||||
|
@ -1278,6 +1281,15 @@ class TestDomainOverview(TestWithDomainPermissions, WebTest):
|
|||
self.assertContains(detail_page, "(1.2.3.4,")
|
||||
self.assertContains(detail_page, "2.3.4.5)")
|
||||
|
||||
def test_domain_with_no_information_or_application(self):
|
||||
"""Test that domain management page returns 200 when no
|
||||
domain information or domain application exist"""
|
||||
detail_page = self.app.get(
|
||||
reverse("domain", kwargs={"pk": self.domain_no_information.id})
|
||||
)
|
||||
|
||||
self.assertContains(detail_page, "noinformation.gov")
|
||||
|
||||
|
||||
class TestDomainManagers(TestDomainOverview):
|
||||
def test_domain_managers(self):
|
||||
|
|
|
@ -99,8 +99,8 @@ class DomainPermission(PermissionsLoginMixin):
|
|||
requested_domain = None
|
||||
if DomainInformation.objects.filter(id=pk).exists():
|
||||
requested_domain = DomainInformation.objects.get(id=pk)
|
||||
|
||||
# if no domain information or domain application exist, the user
|
||||
|
||||
# if no domain information or application exist, the user
|
||||
# should be able to manage the domain; however, if domain information
|
||||
# and domain application exist, and application is not in valid status,
|
||||
# user should not be able to manage domain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue