mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Stop live services requesting to go live
Live services shouldn't be able to request to go live again. Once a service is live we remove the option to go live from the Settings page, but we still link to the page to request to go live from other places e.g. the 'Get started' page. As a result, we've seen some services make another request to go live when their service has already been live for months - this change will stop that from happening.
This commit is contained in:
@@ -1037,6 +1037,28 @@ def test_should_not_show_go_live_button_if_checklist_not_complete(
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('go_live_at, message', [
|
||||
(None, '‘service one’ is already live.'),
|
||||
('2020-10-09 13:55:20', '‘service one’ went live on 9 October 2020.'),
|
||||
])
|
||||
def test_request_to_go_live_redirects_if_service_already_live(
|
||||
client_request,
|
||||
service_one,
|
||||
go_live_at,
|
||||
message,
|
||||
):
|
||||
service_one['restricted'] = False
|
||||
service_one['go_live_at'] = go_live_at
|
||||
|
||||
page = client_request.get(
|
||||
'main.request_to_go_live',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
)
|
||||
|
||||
assert page.h1.text == 'Your service is already live'
|
||||
assert normalize_spaces(page.select_one('main p').text) == message
|
||||
|
||||
|
||||
@pytest.mark.parametrize((
|
||||
'estimated_sms_volume,'
|
||||
'organisation_type,'
|
||||
|
||||
Reference in New Issue
Block a user