mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-15 15:28:50 -04:00
Test permissions on the inbox updates
This commit is contained in:
@@ -189,12 +189,17 @@ def test_empty_inbox(
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('endpoint', [
|
||||
'main.inbox',
|
||||
'main.inbox_updates',
|
||||
])
|
||||
def test_inbox_not_accessible_to_service_without_permissions(
|
||||
logged_in_client,
|
||||
service_one,
|
||||
endpoint,
|
||||
):
|
||||
service_one['permissions'] = []
|
||||
response = logged_in_client.get(url_for('main.inbox', service_id=SERVICE_ONE_ID))
|
||||
response = logged_in_client.get(url_for(endpoint, service_id=SERVICE_ONE_ID))
|
||||
|
||||
assert response.status_code == 403
|
||||
|
||||
@@ -228,8 +233,6 @@ def test_view_inbox_updates(
|
||||
mock_get_inbound_sms_with_no_messages,
|
||||
):
|
||||
|
||||
service_one['permissions'] = ['inbound_sms']
|
||||
|
||||
mock_get_partials = mocker.patch(
|
||||
'app.main.views.dashboard.get_inbox_partials',
|
||||
return_value={'messages': 'foo'},
|
||||
|
||||
Reference in New Issue
Block a user