Skip to content

Commit

Permalink
adding test for redirect view (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanbady authored Aug 21, 2024
1 parent a33484d commit 88d2535
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@ def test_authed_error(user_client):
response = user_client.get(f"/{uuid.uuid4()}")

assert response.status_code == 404


def test_redirect_route(settings, user_client):
"""
Simple Test that checks that we have a catch all redirect view
so that is not accidently removed
"""
response = user_client.get("/app", follow=True)
assert response.redirect_chain[0][0] == settings.APP_BASE_URL
assert response.redirect_chain[0][1] == 302

0 comments on commit 88d2535

Please sign in to comment.