Merge pull request #3549 from alphagov/go-to-broadcast-once-created

Go to broadcast, not dashboard after submitting for approval
This commit is contained in:
Chris Hill-Scott
2020-08-04 11:40:34 +01:00
committed by GitHub
2 changed files with 9 additions and 2 deletions
+2 -1
View File
@@ -169,8 +169,9 @@ def preview_broadcast_message(service_id, broadcast_message_id):
if form.validate_on_submit(): if form.validate_on_submit():
broadcast_message.request_approval(until=form.finishes_at.data) broadcast_message.request_approval(until=form.finishes_at.data)
return redirect(url_for( return redirect(url_for(
'.broadcast_dashboard', '.view_broadcast_message',
service_id=current_service.id, service_id=current_service.id,
broadcast_message_id=broadcast_message.id,
)) ))
return render_template( return render_template(
+7 -1
View File
@@ -412,7 +412,13 @@ def test_start_broadcasting(
broadcast_message_id=fake_uuid, broadcast_message_id=fake_uuid,
_data={ _data={
'finishes_at': end_time, 'finishes_at': end_time,
} },
_expected_redirect=url_for(
'main.view_broadcast_message',
service_id=SERVICE_ONE_ID,
broadcast_message_id=fake_uuid,
_external=True,
),
), ),
mock_update_broadcast_message.assert_called_once_with( mock_update_broadcast_message.assert_called_once_with(
service_id=SERVICE_ONE_ID, service_id=SERVICE_ONE_ID,