summaryrefslogtreecommitdiff
path: root/src/channel/routes/test.rs
diff options
context:
space:
mode:
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);
}