mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 21:41:04 +00:00
Add test for User::outbox_collection07()
This commit is contained in:
parent
d62f51665b
commit
e392a89526
1 changed files with 21 additions and 0 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue