mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 09:29:49 -04:00
Merge pull request #1949 from alphagov/fix-inbound-search
Fix bug with inbound message page
This commit is contained in:
@@ -102,7 +102,9 @@ def get_user_number(service_id, notification_id):
|
|||||||
def get_sms_thread(service_id, user_number):
|
def get_sms_thread(service_id, user_number):
|
||||||
|
|
||||||
for notification in sorted((
|
for notification in sorted((
|
||||||
notification_api_client.get_notifications_for_service(service_id, to=user_number)['notifications'] +
|
notification_api_client.get_notifications_for_service(service_id,
|
||||||
|
to=user_number,
|
||||||
|
template_type='sms')['notifications'] +
|
||||||
service_api_client.get_inbound_sms(service_id, user_number=user_number)
|
service_api_client.get_inbound_sms(service_id, user_number=user_number)
|
||||||
), key=lambda notification: notification['created_at']):
|
), key=lambda notification: notification['created_at']):
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ def test_view_conversation(
|
|||||||
mock_get_inbound_sms
|
mock_get_inbound_sms
|
||||||
):
|
):
|
||||||
|
|
||||||
mock_get_notifications(
|
mock = mock_get_notifications(
|
||||||
mocker,
|
mocker,
|
||||||
api_user_active,
|
api_user_active,
|
||||||
template_content='Hello ((name))',
|
template_content='Hello ((name))',
|
||||||
@@ -158,6 +158,8 @@ def test_view_conversation(
|
|||||||
normalize_spaces(statuses[index].text),
|
normalize_spaces(statuses[index].text),
|
||||||
) == expected
|
) == expected
|
||||||
|
|
||||||
|
mock.assert_called_once_with(SERVICE_ONE_ID, to='07123 456789', template_type='sms')
|
||||||
|
|
||||||
|
|
||||||
def test_view_conversation_updates(
|
def test_view_conversation_updates(
|
||||||
logged_in_client,
|
logged_in_client,
|
||||||
|
|||||||
Reference in New Issue
Block a user