Add test for User::delete_activity07()
This commit is contained in:
parent
8d69051a61
commit
0979471e54
@ -1802,6 +1802,32 @@ pub(crate) mod tests {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn delete_activity07() {
|
||||
let conn = db();
|
||||
conn.test_transaction::<_, Error, _>(|| {
|
||||
let users = fill_database(&conn);
|
||||
let user = &users[1];
|
||||
let act = user.delete_activity07(&conn)?;
|
||||
|
||||
let expected = json!({
|
||||
"actor": "https://plu.me/@/user/",
|
||||
"cc": [],
|
||||
"id": "https://plu.me/@/user/#delete",
|
||||
"object": {
|
||||
"id": "https://plu.me/@/user/",
|
||||
"type": "Tombstone",
|
||||
},
|
||||
"to": ["https://www.w3.org/ns/activitystreams#Public"],
|
||||
"type": "Delete",
|
||||
});
|
||||
|
||||
assert_json_eq!(to_value(act)?, expected);
|
||||
|
||||
Ok(())
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn outbox_collection() {
|
||||
let conn = db();
|
||||
|
Loading…
Reference in New Issue
Block a user