Add test for User::outbox_collection07()

This commit is contained in:
Kitaiti Makoto 2022-02-13 02:22:17 +09:00
parent d62f51665b
commit e392a89526

View File

@ -1673,6 +1673,27 @@ pub(crate) mod tests {
}); });
} }
#[test]
fn outbox_collection07() {
let conn = db();
conn.test_transaction::<_, Error, _>(|| {
let (_pages, users, _blogs) = fill_pages(&conn);
let user = &users[0];
let act = user.outbox_collection07(&conn)?;
let expected = json!({
"first": "https://plu.me/@/admin/outbox?page=1",
"last": "https://plu.me/@/admin/outbox?page=5",
"totalItems": 51,
"type": "OrderedCollection",
});
assert_json_eq!(to_value(act)?, expected);
Ok(())
});
}
#[test] #[test]
fn outbox_collection_page() { fn outbox_collection_page() {
let conn = db(); let conn = db();