Files
notifications-admin/tests/app/main/views/test_tour.py
Chris Hill-Scott 37f341e757 Make tour work for non-logged-in users
There’s no content in the tour that’s specific to a service. And since
we can now take a pretty good guess at what service you last used, or
which service we should send you to if you only have one service,
there’s no need to make the URLs for the tour service-specific.

This also means that you don’t need to be logged in to see the tour
pages, and we have no good reason to only restrict these pages to users
with accounts.

https://www.pivotaltracker.com/story/show/116960703
2016-04-19 10:38:16 +01:00

20 lines
468 B
Python

import pytest
from flask import url_for
import app
@pytest.mark.parametrize("page", range(1, 5))
def test_should_render_tour_pages(
app_,
api_user_active,
mocker,
mock_get_service,
page
):
with app_.test_request_context():
with app_.test_client() as client:
response = client.get(url_for('main.tour', page=page))
assert response.status_code == 200
assert 'Next' in response.get_data(as_text=True)