aboutsummaryrefslogtreecommitdiffstats
path: root/tests/routes.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-04-23 20:52:56 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-04-23 20:52:56 -0700
commit176c76597dd42705cf3aaf307b831cb5f979d9bb (patch)
tree1751b416e44e2af7c7aa750b7974d895054b69f8 /tests/routes.py
parent7b54c0ddea077d1d35c9a7945b73923dbc3288ec (diff)
downloadfatcat-176c76597dd42705cf3aaf307b831cb5f979d9bb.tar.gz
fatcat-176c76597dd42705cf3aaf307b831cb5f979d9bb.zip
improve test coverage
Diffstat (limited to 'tests/routes.py')
-rw-r--r--tests/routes.py30
1 files changed, 27 insertions, 3 deletions
diff --git a/tests/routes.py b/tests/routes.py
index e389a55f..d74412b6 100644
--- a/tests/routes.py
+++ b/tests/routes.py
@@ -26,15 +26,39 @@ def test_all_views(rich_app):
rv = app.get('/{}/1'.format(route))
assert rv.status_code == 200
- rv = app.get('/v0/work/random')
- rv = app.get(rv.location)
- assert rv.status_code == 200
+ rv = app.get('/{}/999999999999'.format(route))
+ assert rv.status_code == 404
+
+ rv = app.get('/work/random')
+ rv = app.get(rv.location)
+ assert rv.status_code == 200
+
+ rv = app.get('/work/random')
+ assert rv.status_code == 302
+
+ rv = app.get('/work/create')
+ assert rv.status_code == 200
+
+ rv = app.get('/release/random')
+ assert rv.status_code == 302
rv = app.get('/editgroup/1')
assert rv.status_code == 200
+ rv = app.get('/editgroup/99999999')
+ assert rv.status_code == 404
+
+ rv = app.get('/editgroup/current')
+ assert rv.status_code == 302
+
rv = app.get('/editor/admin')
assert rv.status_code == 200
+ rv = app.get('/editor/bizzaro')
+ assert rv.status_code == 404
+
rv = app.get('/editor/admin/changelog')
assert rv.status_code == 200
+
+ rv = app.get('/editor/bizarro/changelog')
+ assert rv.status_code == 404