From 970277e71272687c16d75ffa73fcbb461a1fee80 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Fri, 6 May 2022 14:19:14 -0500 Subject: Add a few more tests and update project outline --- app/tests/test_routes.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 app/tests/test_routes.py (limited to 'app/tests/test_routes.py') diff --git a/app/tests/test_routes.py b/app/tests/test_routes.py new file mode 100644 index 0000000..c03238e --- /dev/null +++ b/app/tests/test_routes.py @@ -0,0 +1,24 @@ +import pytest + +from app import app + + +def test_index(client): + resp = client.get("/") + + assert b"Welcome to Strengthy" in resp.data + + +# horrible name +def test_workout_create_notloggedin(client): + resp = client.get("/workout/create", follow_redirects=True) + + # Make sure redirect worked + assert resp.request.path == "/login" + + +def test_home_notloggedin(client): + resp = client.get("/home", follow_redirects=True) + + # Make sure redirect worked + assert resp.request.path == "/login" -- cgit v1.2.3