Skip to content

Commit 5a27609

Browse files
committed
Include the module and update user_agent_is_required test
It was necessary to check the response status manually, because the bad_resp! macro expects to be able to decode a JSON response.
1 parent 68f6824 commit 5a27609

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/tests/all.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ mod krate;
9090
mod owners;
9191
mod record;
9292
mod schema_details;
93+
mod server;
9394
mod team;
9495
mod token;
9596
mod user;

src/tests/server.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use conduit::Method;
1+
use conduit::{Handler, Method};
22

33
use {app, req};
44

@@ -8,5 +8,6 @@ fn user_agent_is_required() {
88

99
let mut req = req(Method::Get, "/api/v1/crates");
1010
req.header("User-Agent", "");
11-
bad_resp!(middle.call(&mut req));
11+
let resp = t!(middle.call(&mut req));
12+
assert_eq!(resp.status.0, 403);
1213
}

0 commit comments

Comments
 (0)