Miscellaneous Fixes (#1752)

* Update CHANGELOG 
* Add `registered_only` decorator
* Make team invites redirect to `/register` if you're unauthed
This commit is contained in:
Kevin Chung
2020-12-04 14:10:36 -05:00
committed by GitHub
parent d9975f307c
commit cb5ba26bdb
6 changed files with 45 additions and 5 deletions

View File

@@ -18,11 +18,12 @@ def test_new_fields_show_on_pages():
gen_field(app.db)
with login_as_user(app) as client:
with app.test_client() as client:
r = client.get("/register")
assert "CustomField" in r.get_data(as_text=True)
assert "CustomFieldDescription" in r.get_data(as_text=True)
with login_as_user(app) as client:
r = client.get("/settings")
assert "CustomField" in r.get_data(as_text=True)
assert "CustomFieldDescription" in r.get_data(as_text=True)
@@ -101,7 +102,7 @@ def test_fields_properties():
app.db, name="CustomField4", required=False, public=False, editable=False
)
with login_as_user(app) as client:
with app.test_client() as client:
r = client.get("/register")
resp = r.get_data(as_text=True)
assert "CustomField1" in resp
@@ -109,6 +110,7 @@ def test_fields_properties():
assert "CustomField3" in resp
assert "CustomField4" in resp
with login_as_user(app) as client:
r = client.get("/settings")
resp = r.get_data(as_text=True)
assert "CustomField1" in resp