summaryrefslogtreecommitdiff
path: root/tests/test_users.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_users.py')
-rw-r--r--tests/test_users.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_users.py b/tests/test_users.py
index e75492a..c3c2373 100644
--- a/tests/test_users.py
+++ b/tests/test_users.py
@@ -62,6 +62,19 @@ def test_get_user_inbox_page_authorised(app, client, auth):
)
+def test_get_user_inbox_page_correct_itemisation(app, client, auth):
+ with app.app_context():
+ inbox_id = url_for("users.get_user_inbox", username="test")
+ auth.login()
+ inbox = client.get(inbox_id).json
+ page_id = inbox["first"]
+ items = client.get(page_id).json["items"]
+
+ assert items
+ assert len(items) > 0
+ assert all([("id" in item or isinstance(item, str)) for item in items])
+
+
def test_get_user_inbox_page_after_logout(app, client, auth):
with app.app_context():
inbox_id = url_for("users.get_user_inbox", username="test")