Add test for User::outbox_collection07()
This commit is contained in:
parent
ffe25cfd3d
commit
7361926ce5
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]
|
||||
fn outbox_collection_page() {
|
||||
let conn = db();
|
||||
|
|
Loading…
Reference in a new issue