Fix count of users on request to go live

We were counting users who had the `manage_settings` permission. This
is the old name for it, therefore there would never be any users with
this permission, so the tick would never go green.

The new name for the permission is `manage_service`. This commit fixes
the error, and adds an extra safeguard against something like this
happening again.
This commit is contained in:
Chris Hill-Scott
2018-03-09 10:47:23 +00:00
parent 5d4fc23128
commit 240f11e715
3 changed files with 5 additions and 2 deletions

View File

@@ -516,7 +516,7 @@ def test_should_show_request_to_go_live_checklist(
service_id=SERVICE_ONE_ID,
)
mock_count_users.assert_called_once_with(SERVICE_ONE_ID, 'manage_settings')
mock_count_users.assert_called_once_with(SERVICE_ONE_ID, 'manage_service')
assert mock_count_templates.call_args_list == [
call(SERVICE_ONE_ID),
call(SERVICE_ONE_ID, template_type='email'),