summaryrefslogtreecommitdiff
path: root/src/channel/routes/test
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-03 20:17:07 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-03 20:17:07 -0400
commit0a5599c60d20ccc2223779eeba5dc91a95ea0fe5 (patch)
treef7ce69ad18768ff53d8fa37d8eb9c6c575633f9e /src/channel/routes/test
parentec804134c33aedb001c426c5f42f43f53c47848f (diff)
Add endpoints for deleting channels and messages.
It is deliberate that the expire() functions do not use them. To avoid races, the transactions must be committed before events get sent, in both cases, which makes them structurally pretty different.
Diffstat (limited to 'src/channel/routes/test')
-rw-r--r--src/channel/routes/test/on_send.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/channel/routes/test/on_send.rs b/src/channel/routes/test/on_send.rs
index 1027b29..3297093 100644
--- a/src/channel/routes/test/on_send.rs
+++ b/src/channel/routes/test/on_send.rs
@@ -5,7 +5,7 @@ use crate::{
channel,
channel::routes,
event,
- message::app,
+ message::app::SendError,
test::fixtures::{self, future::Immediately as _},
};
@@ -77,7 +77,7 @@ async fn nonexistent_channel() {
let request = routes::SendRequest {
message: fixtures::message::propose(),
};
- let routes::ErrorResponse(error) = routes::on_send(
+ let routes::SendErrorResponse(error) = routes::on_send(
State(app),
Path(channel.clone()),
sent_at,
@@ -91,6 +91,6 @@ async fn nonexistent_channel() {
assert!(matches!(
error,
- app::Error::ChannelNotFound(error_channel) if channel == error_channel
+ SendError::ChannelNotFound(error_channel) if channel == error_channel
));
}