mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-03 00:12:16 +02:00
added a test that verify approve will create domaininfo
This commit is contained in:
parent
560646fd03
commit
e8d73d0dc7
1 changed files with 16 additions and 0 deletions
|
@ -191,6 +191,22 @@ class TestPermissions(TestCase):
|
|||
# should be a role for this user
|
||||
self.assertTrue(UserDomainRole.objects.get(user=user, domain=domain))
|
||||
|
||||
class TestDomainInfo(TestCase):
|
||||
|
||||
"""Test creation of Domain Information when approved."""
|
||||
|
||||
def test_approval_creates_info(self):
|
||||
domain, _ = Domain.objects.get_or_create(name="igorville.gov")
|
||||
user, _ = User.objects.get_or_create()
|
||||
application = DomainApplication.objects.create(
|
||||
creator=user, requested_domain=domain
|
||||
)
|
||||
# skip using the submit method
|
||||
application.status = DomainApplication.SUBMITTED
|
||||
application.approve()
|
||||
|
||||
# should be an information present for this domain
|
||||
self.assertTrue(DomainInformation.objects.get(domain=domain))
|
||||
|
||||
class TestInvitations(TestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue