Let caseworkers send one off messages

The main task that we think ‘caseworker’ users do is send one off
messages.

So this commit:
- makes sure users who don’t have the `view_activity` permission (ie
  not ‘admin’ users) can still send messages
- adds navigation so that these users have a place to go from which to
  start the process of sending a one off message
This commit is contained in:
Chris Hill-Scott
2018-06-12 16:17:20 +01:00
parent 2855cf45c7
commit 84de1c5625
11 changed files with 489 additions and 91 deletions

View File

@@ -9,6 +9,8 @@ from notifications_python_client.errors import APIError
from tests.conftest import (
SERVICE_ONE_ID,
active_caseworking_user,
active_user_with_permissions,
mock_get_notification,
normalize_spaces,
)
@@ -23,16 +25,23 @@ from tests.conftest import (
('permanent-failure', 'Phone number doesnt exist'),
('technical-failure', 'Technical failure'),
])
@pytest.mark.parametrize('user', [
active_user_with_permissions,
active_caseworking_user,
])
@freeze_time("2016-01-01 11:09:00.061258")
def test_notification_status_page_shows_details(
client_request,
mocker,
service_one,
fake_uuid,
user,
notification_status,
expected_status,
):
mocker.patch('app.user_api_client.get_user', return_value=user(fake_uuid))
_mock_get_notification = mock_get_notification(
mocker,
fake_uuid,