mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Update service with the user that requested to go live.
When a service is marked as live update the service with the go live datetime.
This commit is contained in:
@@ -416,6 +416,7 @@ def test_show_restricted_service(
|
||||
assert not request_to_live_link
|
||||
|
||||
|
||||
@freeze_time("2017-04-01 11:09:00.061258")
|
||||
def test_switch_service_to_live(
|
||||
client_request,
|
||||
platform_admin_user,
|
||||
@@ -437,7 +438,8 @@ def test_switch_service_to_live(
|
||||
mock_update_service.assert_called_with(
|
||||
SERVICE_ONE_ID,
|
||||
message_limit=250000,
|
||||
restricted=False
|
||||
restricted=False,
|
||||
go_live_at="2017-04-01 11:09:00.061258"
|
||||
)
|
||||
|
||||
|
||||
@@ -481,6 +483,7 @@ def test_switch_service_to_restricted(
|
||||
SERVICE_ONE_ID,
|
||||
message_limit=50,
|
||||
restricted=True,
|
||||
go_live_at=None
|
||||
)
|
||||
|
||||
|
||||
@@ -1303,7 +1306,7 @@ def test_non_gov_users_cant_request_to_go_live(
|
||||
[],
|
||||
),
|
||||
))
|
||||
@freeze_time("2012-12-21")
|
||||
@freeze_time("2012-12-21 13:12:12.12354")
|
||||
def test_should_redirect_after_request_to_go_live(
|
||||
client_request,
|
||||
mocker,
|
||||
@@ -1315,6 +1318,7 @@ def test_should_redirect_after_request_to_go_live(
|
||||
mock_get_service_settings_page_common,
|
||||
mock_get_service_templates,
|
||||
mock_get_users_by_service,
|
||||
mock_update_service,
|
||||
volumes,
|
||||
displayed_volumes,
|
||||
formatted_displayed_volumes,
|
||||
@@ -1380,6 +1384,10 @@ def test_should_redirect_after_request_to_go_live(
|
||||
assert normalize_spaces(page.select_one('h1').text) == (
|
||||
'Settings'
|
||||
)
|
||||
mock_update_service.assert_called_once_with(
|
||||
SERVICE_ONE_ID,
|
||||
go_live_user=active_user_with_permissions.id
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user