mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-31 06:56:33 +02:00
updated tests
This commit is contained in:
parent
a32b0c0373
commit
f2e7278a86
2 changed files with 50 additions and 17 deletions
|
@ -649,23 +649,6 @@ class TestDomainApplicationAdmin(MockEppLib):
|
|||
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
|
||||
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
|
||||
|
||||
def test_save_model_clear_rejected_reason(self):
|
||||
"""When transitioning from rejected on a domain request,
|
||||
the rejected_reason is cleared."""
|
||||
|
||||
# Create a sample application
|
||||
application = completed_application(status=DomainApplication.ApplicationStatus.REJECTED)
|
||||
application.rejected_reason = DomainApplication.RejectionReasons.DOMAIN_PURPOSE
|
||||
application.save()
|
||||
|
||||
# Approve
|
||||
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
|
||||
application.approve()
|
||||
|
||||
application.refresh_from_db()
|
||||
self.assertEqual(application.rejected_reason, None)
|
||||
|
||||
|
||||
def test_save_model_sends_withdrawn_email(self):
|
||||
"""When transitioning to withdrawn on a domain request,
|
||||
an email is sent out every time."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue