summaryrefslogtreecommitdiff
path: root/src/channel/handlers/delete
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-06-20 19:47:46 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-06-20 22:42:55 -0400
commit7778cdf0c495a04f4f5f3f85b78348c8037a5771 (patch)
treebd0e00d36ab1863f5609a3c0ee8936782ae794ca /src/channel/handlers/delete
parent639f4b422adb0a6fc809161dd816d8382cf88138 (diff)
Remove the snapshot fields from `/api/boot`.
Clients now _must_ construct their state from the event stream; it is no longer possible for them to delegate that work to the server.
Diffstat (limited to 'src/channel/handlers/delete')
-rw-r--r--src/channel/handlers/delete/test.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/channel/handlers/delete/test.rs b/src/channel/handlers/delete/test.rs
index b1e42ea..99c19db 100644
--- a/src/channel/handlers/delete/test.rs
+++ b/src/channel/handlers/delete/test.rs
@@ -1,4 +1,5 @@
use axum::extract::{Path, State};
+use itertools::Itertools;
use crate::{channel::app, test::fixtures};
@@ -28,7 +29,16 @@ pub async fn valid_channel() {
// Verify the semantics
let snapshot = app.boot().snapshot().await.expect("boot always succeeds");
- assert!(!snapshot.channels.contains(&channel));
+ let created = snapshot
+ .events
+ .into_iter()
+ .filter_map(fixtures::event::channel)
+ .filter_map(fixtures::event::channel::created)
+ .exactly_one()
+ .expect("only one channel has been created");
+ // We don't expect `channel` to match the event exactly, as the name will have been
+ // tombstoned and the channel given a `deleted_at` date.
+ assert_eq!(channel.id, created.channel.id);
}
#[tokio::test]