From 6323c7aef8dc77d412d99c5fe47f9129ec97539e Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 14 Feb 2022 02:27:16 +0900 Subject: [PATCH] Add test for User::outbox_page_collection07() --- plume-models/src/users.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/plume-models/src/users.rs b/plume-models/src/users.rs index ce90bee5..70e102c6 100644 --- a/plume-models/src/users.rs +++ b/plume-models/src/users.rs @@ -1930,4 +1930,25 @@ pub(crate) mod tests { Ok(()) }); } + + #[test] + fn outbox_collection_page07() { + let conn = db(); + conn.test_transaction::<_, Error, _>(|| { + let users = fill_database(&conn); + let user = &users[0]; + let act = user.outbox_collection_page07(&conn, (33, 36))?; + + let expected = json!({ + "items": [], + "partOf": "https://plu.me/@/admin/outbox", + "prev": "https://plu.me/@/admin/outbox?page=2", + "type": "OrderedCollectionPage", + }); + + assert_json_eq!(to_value(act)?, expected); + + Ok(()) + }); + } }