mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
Adding tests for verify_emails and user_can_view_challenges are set (#462)
* Fixing verify_emails + user_can_view_challenges logic * Adding tests for verify_emails and user_can_view_challenges
This commit is contained in:
@@ -91,9 +91,10 @@ def test_user_isnt_admin():
|
||||
with app.app_context():
|
||||
register_user(app)
|
||||
client = login_as_user(app)
|
||||
r = client.get('/admin/graphs')
|
||||
assert r.location == "http://localhost/login"
|
||||
assert r.status_code == 302
|
||||
for page in ['graphs', 'pages', 'teams', 'scoreboard', 'chals', 'statistics', 'config']:
|
||||
r = client.get('/admin/{}'.format(page))
|
||||
assert r.location == "http://localhost/login"
|
||||
assert r.status_code == 302
|
||||
destroy_ctfd(app)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user