mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-30 17:23:55 +02:00
New unit tests
This commit is contained in:
parent
65a23fc51e
commit
277198c0aa
1 changed files with 9 additions and 9 deletions
|
@ -1319,7 +1319,6 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
("title", "Admin Tester"),
|
("title", "Admin Tester"),
|
||||||
("email", "mayor@igorville.gov"),
|
("email", "mayor@igorville.gov"),
|
||||||
("phone", "(555) 555 5556"),
|
("phone", "(555) 555 5556"),
|
||||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
|
||||||
]
|
]
|
||||||
self.test_helper.assert_response_contains_distinct_values(response, expected_submitter_fields)
|
self.test_helper.assert_response_contains_distinct_values(response, expected_submitter_fields)
|
||||||
self.assertContains(response, "Testy2 Tester2")
|
self.assertContains(response, "Testy2 Tester2")
|
||||||
|
@ -1328,10 +1327,9 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
expected_email = "testy@town.com"
|
expected_email = "testy@town.com"
|
||||||
expected_ao_fields = [
|
expected_ao_fields = [
|
||||||
# Field, expected value
|
# Field, expected value
|
||||||
("title", "Chief Tester</td>"),
|
("title", "Chief Tester"),
|
||||||
("email", "testy@town.com</td>"),
|
("email", "testy@town.com"),
|
||||||
("phone", "(555) 555 5555</td>"),
|
("phone", "(555) 555 5555"),
|
||||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
|
||||||
]
|
]
|
||||||
self.test_helper.assert_response_contains_distinct_values(response, expected_ao_fields)
|
self.test_helper.assert_response_contains_distinct_values(response, expected_ao_fields)
|
||||||
|
|
||||||
|
@ -1346,10 +1344,12 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
("title", "Another Tester"),
|
("title", "Another Tester"),
|
||||||
("email", "testy2@town.com"),
|
("email", "testy2@town.com"),
|
||||||
("phone", "(555) 555 5557"),
|
("phone", "(555) 555 5557"),
|
||||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
|
||||||
]
|
]
|
||||||
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
||||||
|
|
||||||
|
# Test for the copy link
|
||||||
|
self.assertContains(response, "usa-button__clipboard-link", count=4)
|
||||||
|
|
||||||
def test_save_model_sets_restricted_status_on_user(self):
|
def test_save_model_sets_restricted_status_on_user(self):
|
||||||
with less_console_noise():
|
with less_console_noise():
|
||||||
# make sure there is no user with this email
|
# make sure there is no user with this email
|
||||||
|
@ -2047,7 +2047,6 @@ class TestDomainInformationAdmin(TestCase):
|
||||||
("title", "Admin Tester"),
|
("title", "Admin Tester"),
|
||||||
("email", "mayor@igorville.gov"),
|
("email", "mayor@igorville.gov"),
|
||||||
("phone", "(555) 555 5556"),
|
("phone", "(555) 555 5556"),
|
||||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
|
||||||
]
|
]
|
||||||
self.test_helper.assert_response_contains_distinct_values(response, expected_submitter_fields)
|
self.test_helper.assert_response_contains_distinct_values(response, expected_submitter_fields)
|
||||||
self.assertContains(response, "Testy2 Tester2")
|
self.assertContains(response, "Testy2 Tester2")
|
||||||
|
@ -2059,7 +2058,6 @@ class TestDomainInformationAdmin(TestCase):
|
||||||
("title", "Chief Tester"),
|
("title", "Chief Tester"),
|
||||||
("email", "testy@town.com"),
|
("email", "testy@town.com"),
|
||||||
("phone", "(555) 555 5555"),
|
("phone", "(555) 555 5555"),
|
||||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
|
||||||
]
|
]
|
||||||
self.test_helper.assert_response_contains_distinct_values(response, expected_ao_fields)
|
self.test_helper.assert_response_contains_distinct_values(response, expected_ao_fields)
|
||||||
|
|
||||||
|
@ -2074,10 +2072,12 @@ class TestDomainInformationAdmin(TestCase):
|
||||||
("title", "Another Tester"),
|
("title", "Another Tester"),
|
||||||
("email", "testy2@town.com"),
|
("email", "testy2@town.com"),
|
||||||
("phone", "(555) 555 5557"),
|
("phone", "(555) 555 5557"),
|
||||||
("email_copy_button_input", f'<input class="dja-clipboard-input" type="hidden" value="{expected_email}"'),
|
|
||||||
]
|
]
|
||||||
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
self.test_helper.assert_response_contains_distinct_values(response, expected_other_employees_fields)
|
||||||
|
|
||||||
|
# Test for the copy link
|
||||||
|
self.assertContains(response, "usa-button__clipboard-link", count=4)
|
||||||
|
|
||||||
def test_readonly_fields_for_analyst(self):
|
def test_readonly_fields_for_analyst(self):
|
||||||
"""Ensures that analysts have their permissions setup correctly"""
|
"""Ensures that analysts have their permissions setup correctly"""
|
||||||
with less_console_noise():
|
with less_console_noise():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue