mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-19 22:13:48 -04:00
Merge pull request #1865 from alphagov/no-slash-dashboard
Remove dashboard from dashboard URL
This commit is contained in:
@@ -42,6 +42,19 @@ stub_template_stats = [
|
||||
]
|
||||
|
||||
|
||||
def test_redirect_from_old_dashboard(
|
||||
logged_in_client
|
||||
):
|
||||
|
||||
expected_location = 'http://localhost/services/{}'.format(SERVICE_ONE_ID)
|
||||
|
||||
response = logged_in_client.get('/services/{}/dashboard'.format(SERVICE_ONE_ID))
|
||||
|
||||
assert response.status_code == 302
|
||||
assert response.location == expected_location
|
||||
assert expected_location == url_for('main.service_dashboard', service_id=SERVICE_ONE_ID, _external=True)
|
||||
|
||||
|
||||
def test_get_started(
|
||||
logged_in_client,
|
||||
mocker,
|
||||
|
||||
@@ -59,7 +59,7 @@ def test_should_login_user_and_should_redirect_to_next_url(
|
||||
session['user_details'] = {
|
||||
'id': api_user_active.id,
|
||||
'email': api_user_active.email_address}
|
||||
response = client.post(url_for('main.two_factor', next='/services/{}/dashboard'.format(SERVICE_ONE_ID)),
|
||||
response = client.post(url_for('main.two_factor', next='/services/{}'.format(SERVICE_ONE_ID)),
|
||||
data={'sms_code': '12345'})
|
||||
assert response.status_code == 302
|
||||
assert response.location == url_for(
|
||||
|
||||
Reference in New Issue
Block a user