mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 04:13:12 -04:00
Add a redirect for the letter specification
This way we have a URL we can give people that always points to the latest version of the spec. And it makes our code more Flask-idiomatic to be using `url_for` to be generating a URL, rather than passing around a constant.
This commit is contained in:
@@ -254,3 +254,21 @@ def test_letter_template_preview_headers(
|
||||
)
|
||||
|
||||
assert response.headers.get('X-Frame-Options') == 'SAMEORIGIN'
|
||||
|
||||
|
||||
def test_letter_spec_redirect(client_request):
|
||||
expected_url = (
|
||||
'https://docs.notifications.service.gov.uk'
|
||||
'/documentation/images/notify-pdf-letter-spec-v2.4.pdf'
|
||||
)
|
||||
client_request.get(
|
||||
'main.letter_spec',
|
||||
_expected_status=302,
|
||||
_expected_redirect=expected_url,
|
||||
)
|
||||
client_request.logout()
|
||||
client_request.get(
|
||||
'main.letter_spec',
|
||||
_expected_status=302,
|
||||
_expected_redirect=expected_url,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user