summaryrefslogtreecommitdiff
path: root/src/channel/routes/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/channel/routes/test')
-rw-r--r--src/channel/routes/test/on_create.rs6
-rw-r--r--src/channel/routes/test/on_send.rs10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/channel/routes/test/on_create.rs b/src/channel/routes/test/on_create.rs
index ed49017..8c3c62b 100644
--- a/src/channel/routes/test/on_create.rs
+++ b/src/channel/routes/test/on_create.rs
@@ -2,7 +2,7 @@ use axum::extract::{Json, State};
use futures::stream::StreamExt as _;
use crate::{
- channel::{app, routes},
+ channel::{self, app, routes},
event,
test::fixtures::{self, future::Immediately as _},
};
@@ -53,8 +53,8 @@ async fn new_channel() {
.expect("creation event published");
assert!(matches!(
- event.kind,
- event::Kind::ChannelCreated(event)
+ event,
+ event::Event::Channel(channel::Event::Created(event))
if event.channel == response_channel
));
}
diff --git a/src/channel/routes/test/on_send.rs b/src/channel/routes/test/on_send.rs
index 3297093..d2acc48 100644
--- a/src/channel/routes/test/on_send.rs
+++ b/src/channel/routes/test/on_send.rs
@@ -4,8 +4,8 @@ use futures::stream::StreamExt;
use crate::{
channel,
channel::routes,
- event,
- message::app::SendError,
+ event::{self, Sequenced},
+ message::{self, app::SendError},
test::fixtures::{self, future::Immediately as _},
};
@@ -53,10 +53,10 @@ async fn messages_in_order() {
let events = events.collect::<Vec<_>>().immediately().await;
for ((sent_at, message), event) in requests.into_iter().zip(events) {
- assert_eq!(*sent_at, event.instant.at);
+ assert_eq!(*sent_at, event.at());
assert!(matches!(
- event.kind,
- event::Kind::MessageSent(event)
+ event,
+ event::Event::Message(message::Event::Sent(event))
if event.message.sender == sender
&& event.message.body == message
));