mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
Merge pull request #2997 from alphagov/org-settings-platform-admin-only
Make organisation settings platform admin only
This commit is contained in:
@@ -161,24 +161,16 @@ def test_organisation_trial_mode_services_doesnt_work_if_not_platform_admin(
|
||||
)
|
||||
|
||||
|
||||
def test_organisation_settings(
|
||||
def test_organisation_settings_platform_admin_only(
|
||||
client_request,
|
||||
mock_get_organisation,
|
||||
organisation_one
|
||||
):
|
||||
expected_rows = [
|
||||
'Label Value Action',
|
||||
'Organisation name Org 1 Change',
|
||||
]
|
||||
|
||||
page = client_request.get('.organisation_settings', org_id=organisation_one['id'])
|
||||
|
||||
assert page.find('h1').text == 'Settings'
|
||||
rows = page.select('tr')
|
||||
assert len(rows) == len(expected_rows)
|
||||
for index, row in enumerate(expected_rows):
|
||||
assert row == " ".join(rows[index].text.split())
|
||||
mock_get_organisation.assert_called_with(organisation_one['id'])
|
||||
client_request.get(
|
||||
'.organisation_settings',
|
||||
org_id=organisation_one['id'],
|
||||
_expected_status=403,
|
||||
)
|
||||
|
||||
|
||||
def test_organisation_settings_for_platform_admin(
|
||||
@@ -189,10 +181,8 @@ def test_organisation_settings_for_platform_admin(
|
||||
):
|
||||
expected_rows = [
|
||||
'Label Value Action',
|
||||
'Organisation name Org 1 Change',
|
||||
|
||||
'Label Value Action',
|
||||
'Organisation type Not set Change',
|
||||
'Name Org 1 Change',
|
||||
'Sector Not set Change',
|
||||
'Crown organisation Yes Change',
|
||||
'Data sharing and financial agreement Not signed Change',
|
||||
'Request to go live notes None Change',
|
||||
|
||||
Reference in New Issue
Block a user