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.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/channel/routes/test.rs b/src/channel/routes/test.rs
index ffd8484..7879ba0 100644
--- a/src/channel/routes/test.rs
+++ b/src/channel/routes/test.rs
@@ -20,9 +20,10 @@ async fn new_channel() {
let name = fixtures::channel::propose();
let request = post::Request { name: name.clone() };
- let Json(response) = post::handler(State(app.clone()), creator, fixtures::now(), Json(request))
- .await
- .expect("creating a channel in an empty app succeeds");
+ let post::Response(response) =
+ post::handler(State(app.clone()), creator, fixtures::now(), Json(request))
+ .await
+ .expect("creating a channel in an empty app succeeds");
// Verify the structure of the response
@@ -96,7 +97,7 @@ async fn name_reusable_after_delete() {
// Call the endpoint (first time)
let request = post::Request { name: name.clone() };
- let Json(response) = post::handler(
+ let post::Response(response) = post::handler(
State(app.clone()),
creator.clone(),
fixtures::now(),
@@ -115,9 +116,10 @@ async fn name_reusable_after_delete() {
// Call the endpoint (second time)
let request = post::Request { name: name.clone() };
- let Json(response) = post::handler(State(app.clone()), creator, fixtures::now(), Json(request))
- .await
- .expect("new channel in an empty app");
+ let post::Response(response) =
+ post::handler(State(app.clone()), creator, fixtures::now(), Json(request))
+ .await
+ .expect("new channel in an empty app");
// Verify the structure of the response