Skip to content

Commit

Permalink
Add failing test for data = None
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilm committed Nov 12, 2015
1 parent cabe652 commit a6cf29d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,13 @@ fn ping_pong() {
// helpful for resolving what the problem is.
let res: ResponseData = request(Method::Post, &(url("/ping"))[..], Some(req)).unwrap().unwrap();
}

#[test]
#[allow(unused_variables)]
fn ping_pong_none_data() {
let server = StackListener::new();

// When this fails, the error I get it "called Option::unwrap() on a None value" which is not
// helpful for resolving what the problem is.
let res: ResponseData = request(Method::Post, &(url("/ping"))[..], None).unwrap().unwrap();
}

0 comments on commit a6cf29d

Please sign in to comment.