summaryrefslogtreecommitdiff
path: root/app/tests/test_routes.py
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonmail.com>2022-05-06 14:19:14 -0500
committerstilbruch <stilbruch@protonmail.com>2022-05-06 14:19:14 -0500
commit970277e71272687c16d75ffa73fcbb461a1fee80 (patch)
treee3e47dda5edbb36fbd737068bd908936f395f328 /app/tests/test_routes.py
parentc573605ac77b82068de0961a0309cdf07e4d7b65 (diff)
downloadStrengthy-970277e71272687c16d75ffa73fcbb461a1fee80.tar.xz
Strengthy-970277e71272687c16d75ffa73fcbb461a1fee80.zip
Add a few more tests and update project outline
Diffstat (limited to 'app/tests/test_routes.py')
-rw-r--r--app/tests/test_routes.py24
1 files changed, 24 insertions, 0 deletions
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"