summaryrefslogtreecommitdiff
path: root/src/channel/routes/test.rs
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-10-25 22:16:03 -0400
committerKit La Touche <kit@transneptune.net>2024-10-25 22:16:03 -0400
commita50911a03c8955e08c77b0f3764dbda963013971 (patch)
tree9f5319191438b85b860ba06c9a203d3f129072a1 /src/channel/routes/test.rs
parent4c49283553f4b18bb2a74de280b340a073e3253e (diff)
parentc87b5c53077c02bf21234e24bf976aa7a5f2bac8 (diff)
Merge branch 'main' into wip/mobile
Diffstat (limited to 'src/channel/routes/test.rs')
-rw-r--r--src/channel/routes/test.rs15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/channel/routes/test.rs b/src/channel/routes/test.rs
index 216eba1..10b1e8d 100644
--- a/src/channel/routes/test.rs
+++ b/src/channel/routes/test.rs
@@ -7,7 +7,7 @@ use super::post;
use crate::{
channel::app,
name::Name,
- test::fixtures::{self, future::Immediately as _},
+ test::fixtures::{self, future::Expect as _},
};
#[tokio::test]
@@ -39,7 +39,6 @@ async fn new_channel() {
.channels()
.get(&response.id)
.await
- .expect("searching for channels by ID never fails")
.expect("the newly-created channel exists");
assert_eq!(response, channel);
@@ -48,15 +47,11 @@ async fn new_channel() {
.subscribe(None)
.await
.expect("subscribing never fails")
- .filter_map(fixtures::channel::events)
- .filter_map(fixtures::channel::created)
+ .filter_map(fixtures::event::channel)
+ .filter_map(fixtures::event::channel::created)
.filter(|event| future::ready(event.channel == response));
- let event = events
- .next()
- .immediately()
- .await
- .expect("creation event published");
+ let event = events.next().expect_some("creation event published").await;
assert_eq!(event.channel, response);
}
@@ -165,7 +160,6 @@ async fn name_reusable_after_delete() {
.channels()
.get(&response.id)
.await
- .expect("searching for channels by ID never fails")
.expect("the newly-created channel exists");
assert_eq!(response, channel);
}
@@ -215,7 +209,6 @@ async fn name_reusable_after_expiry() {
.channels()
.get(&response.id)
.await
- .expect("searching for channels by ID never fails")
.expect("the newly-created channel exists");
assert_eq!(response, channel);
}