mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 01:23:11 -04:00
Test the POST .approve_broadcast_message explicitly in the code
Previously, to get the the `.approve_broadcast_message` endpoint, we were issuing a POST request to `.view_current_broadcast`. The `.view_current_broadcast` only has a GET endpoint defined for the `/services/<uuid:service_id>/current-alerts/<uuid:broadcast_message_id>` route, so the request would end up at the `.approve_broadcast_message` which defines the POST endpoint for that path. This changes the tests to POST directly to `.approve_broadcast_message` to avoid confusion.
This commit is contained in:
@@ -2018,7 +2018,7 @@ def test_confirm_approve_non_training_broadcasts_errors_if_not_ticked(
|
|||||||
|
|
||||||
client_request.login(active_user_approve_broadcasts_permission)
|
client_request.login(active_user_approve_broadcasts_permission)
|
||||||
page = client_request.post(
|
page = client_request.post(
|
||||||
'.view_current_broadcast',
|
'.approve_broadcast_message',
|
||||||
service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
broadcast_message_id=fake_uuid,
|
broadcast_message_id=fake_uuid,
|
||||||
_data={},
|
_data={},
|
||||||
@@ -2441,7 +2441,7 @@ def test_confirm_approve_broadcast(
|
|||||||
|
|
||||||
client_request.login(active_user_approve_broadcasts_permission)
|
client_request.login(active_user_approve_broadcasts_permission)
|
||||||
client_request.post(
|
client_request.post(
|
||||||
'.view_current_broadcast',
|
'.approve_broadcast_message',
|
||||||
service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
broadcast_message_id=fake_uuid,
|
broadcast_message_id=fake_uuid,
|
||||||
_expected_redirect=expected_redirect(
|
_expected_redirect=expected_redirect(
|
||||||
|
|||||||
Reference in New Issue
Block a user