fix(activitypub-base): deterministic announce IDs so Undo(Announce) can reference original activity
This commit is contained in:
@@ -414,6 +414,21 @@ mod tests {
|
||||
assert_eq!(undo_announced[0], "https://mastodon.social/users/bob/statuses/456");
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn boost_removed_does_not_broadcast_if_thought_missing() {
|
||||
let store = TestStore::default();
|
||||
let alice = alice();
|
||||
let spy = Arc::new(SpyPort::default());
|
||||
svc(&store, spy.clone())
|
||||
.process(&DomainEvent::BoostRemoved {
|
||||
user_id: alice.id.clone(),
|
||||
thought_id: ThoughtId::new(), // doesn't exist in store
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(spy.undo_announced.lock().unwrap().is_empty());
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn thought_updated_does_not_broadcast_if_user_missing() {
|
||||
let store = TestStore::default();
|
||||
|
||||
Reference in New Issue
Block a user