mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 03:30:50 +02:00
unit tests
This commit is contained in:
parent
72ee81a43c
commit
ea6ccae948
7 changed files with 309 additions and 43 deletions
|
@ -3710,6 +3710,22 @@ class TestMyUserAdmin(MockDb):
|
|||
expected_href = reverse("admin:registrar_domain_change", args=[domain_deleted.pk])
|
||||
self.assertNotContains(response, expected_href)
|
||||
|
||||
def test_analyst_can_see_selects_for_portfolio_role_and_permissions_in_user_form(self):
|
||||
"""Can only test for the presence of a base element. The multiselects and the h2->h3 conversion are all
|
||||
dynamically generated."""
|
||||
|
||||
p = "userpass"
|
||||
self.client.login(username="staffuser", password=p)
|
||||
response = self.client.get(
|
||||
"/admin/registrar/user/{}/change/".format(self.meoward_user.id),
|
||||
follow=True,
|
||||
)
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
self.assertContains(response,"Portfolio roles:")
|
||||
self.assertContains(response,"Portfolio additional permissions:")
|
||||
|
||||
|
||||
class AuditedAdminTest(TestCase):
|
||||
def setUp(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue