Remove dashboard from dashboard URL

It’s weird that `/services/<service_id>` returns `404`. The home page
for every service is the dashboard – should be possible to get there
from any other page just by stemming the URL.

Also makes it consistent with organisations, which will have
`/organisations/<org_id>`.
This commit is contained in:
Chris Hill-Scott
2018-02-14 10:38:00 +00:00
parent 0f20cfe8bc
commit 95482363aa
3 changed files with 21 additions and 1 deletions

View File

@@ -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,