mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Test next redirects with realistic URL
This change has been made following PR review, to ensure that special signs are transformed correctly when passing through the next URL.
This commit is contained in:
@@ -12,7 +12,7 @@ from tests.conftest import (
|
||||
|
||||
|
||||
@pytest.mark.parametrize('request_url', ['two_factor_email_sent', 'revalidate_email_sent'])
|
||||
@pytest.mark.parametrize('redirect_url', [None, 'blob'])
|
||||
@pytest.mark.parametrize('redirect_url', [None, f'/services/{SERVICE_ONE_ID}/templates'])
|
||||
@pytest.mark.parametrize('email_resent, page_title', [
|
||||
(None, 'Check your email'),
|
||||
(True, 'Email resent')
|
||||
@@ -38,7 +38,7 @@ def test_two_factor_email_sent_page(
|
||||
|
||||
@pytest.mark.parametrize('redirect_url', [
|
||||
None,
|
||||
'blob',
|
||||
f'/services/{SERVICE_ONE_ID}/templates',
|
||||
])
|
||||
def test_should_render_two_factor_page(
|
||||
client,
|
||||
@@ -353,7 +353,7 @@ def test_valid_two_factor_email_link_logs_in_user(
|
||||
|
||||
@pytest.mark.parametrize('redirect_url', [
|
||||
None,
|
||||
'blob',
|
||||
f'/services/{SERVICE_ONE_ID}/templates',
|
||||
])
|
||||
def test_two_factor_email_link_has_expired(
|
||||
app_,
|
||||
@@ -397,7 +397,7 @@ def test_two_factor_email_link_is_invalid(
|
||||
|
||||
@pytest.mark.parametrize('redirect_url', [
|
||||
None,
|
||||
'blob',
|
||||
f'/services/{SERVICE_ONE_ID}/templates',
|
||||
])
|
||||
def test_two_factor_email_link_is_already_used(
|
||||
client,
|
||||
|
||||
Reference in New Issue
Block a user