mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
fixed testing
This commit is contained in:
@@ -52,7 +52,10 @@ def test_logged_in_user_redirects_to_choose_account(
|
||||
client_request.get(
|
||||
"main.sign_in",
|
||||
_expected_status=302,
|
||||
_expected_redirect=url_for("main.show_accounts_or_dashboard"),
|
||||
_expected_redirect=url_for(
|
||||
"main.show_accounts_or_dashboard",
|
||||
next="EMAIL_IS_OK",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -91,6 +94,7 @@ def test_hiding_pages_from_search_engines(
|
||||
"roadmap",
|
||||
"features",
|
||||
"documentation",
|
||||
"guidance",
|
||||
"security",
|
||||
"message_status",
|
||||
"features_sms",
|
||||
@@ -127,6 +131,28 @@ def test_static_pages(client_request, mock_get_organization_by_domain, view, moc
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"endpoint, template",
|
||||
[
|
||||
("main.guidance", "views/guidance/guidance.html"),
|
||||
("main.clear_goals", "views/guidance/clear-goals.html"),
|
||||
("main.rules_and_regulations", "views/guidance/rules-and-regulations.html"),
|
||||
("main.establish_trust", "views/guidance/establish-trust.html"),
|
||||
("main.write_for_action", "views/guidance/write-for-action.html"),
|
||||
("main.multiple_languages", "views/guidance/multiple-languages.html"),
|
||||
("main.benchmark_performance", "views/guidance/benchmark-performance.html"),
|
||||
]
|
||||
)
|
||||
def test_guidance_routes(client_request, endpoint, template):
|
||||
# Make the request to the endpoint
|
||||
page = client_request.get(endpoint)
|
||||
|
||||
# Assert that the page loads successfully (HTTP 200 OK)
|
||||
assert page.status_code == 200
|
||||
|
||||
|
||||
|
||||
|
||||
def test_guidance_pages_link_to_service_pages_when_signed_in(client_request, mocker):
|
||||
|
||||
mocker.patch("app.notify_client.user_api_client.UserApiClient.deactivate_user")
|
||||
|
||||
Reference in New Issue
Block a user