Skip to content

Commit

Permalink
Add routes to each test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastian Gruber committed Feb 28, 2019
1 parent 8170c5f commit 644f47e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/wildcard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ fn wildcard() {

#[test]
fn invalid_segment_error() {
let app = tide::App::new(());
let mut app = tide::App::new(());
app.at("/add_one/{num}").get(add_one);
let mut server = make_server(app.into_http_service()).unwrap();

let req = http::Request::get("/add_one/a")
Expand All @@ -61,7 +62,8 @@ fn invalid_segment_error() {

#[test]
fn not_found_error() {
let app = tide::App::new(());
let mut app = tide::App::new(());
app.at("/add_one/{num}").get(add_one);
let mut server = make_server(app.into_http_service()).unwrap();

let req = http::Request::get("/add_one/").body(Body::empty()).unwrap();
Expand Down

0 comments on commit 644f47e

Please sign in to comment.