mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-29 04:23:19 +02:00
Fix checkbox unchecked test
This commit is contained in:
parent
e196e02d92
commit
aad1ee976b
1 changed files with 3 additions and 11 deletions
|
@ -631,19 +631,11 @@ class TestDomainDetailDomainRenewal(TestDomainOverview):
|
||||||
# Grab the renewal URL
|
# Grab the renewal URL
|
||||||
renewal_url = reverse("domain-renewal", kwargs={"pk": self.domain_with_ip.id})
|
renewal_url = reverse("domain-renewal", kwargs={"pk": self.domain_with_ip.id})
|
||||||
|
|
||||||
# Test clicking the checkbox
|
# Test that the checkbox is not checked
|
||||||
response = self.client.post(renewal_url, data={"submit_button": "next"})
|
response = self.client.post(renewal_url, data={"submit_button": "next"})
|
||||||
|
|
||||||
# Verify the error message is displayed
|
error_message = "Check the box if you read and agree to the requirements for operating a .gov domain."
|
||||||
# Retrieves messages obj (used in the post call)
|
self.assertContains(response, error_message)
|
||||||
messages = list(get_messages(response.wsgi_request))
|
|
||||||
# Check we only get 1 error message
|
|
||||||
self.assertEqual(len(messages), 1)
|
|
||||||
# Check that the 1 error msg also is the right text
|
|
||||||
self.assertEqual(
|
|
||||||
str(messages[0]),
|
|
||||||
"Check the box if you read and agree to the requirements for operating a .gov domain.",
|
|
||||||
)
|
|
||||||
|
|
||||||
@override_flag("domain_renewal", active=True)
|
@override_flag("domain_renewal", active=True)
|
||||||
def test_ack_checkbox_checked(self):
|
def test_ack_checkbox_checked(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue