From dd76f4de394da3d9ce8cd19b853da10d56caf8cd Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 11 Nov 2017 23:01:53 +0100 Subject: Handle `Result` return values in tests Update our failing test suite to work with our new return types now that many of our functions return `Result`s. Since these are tests, we handle them by panicking with error messages. --- src/pull_request.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pull_request.rs') diff --git a/src/pull_request.rs b/src/pull_request.rs index df4cd2a..c97df53 100644 --- a/src/pull_request.rs +++ b/src/pull_request.rs @@ -448,7 +448,8 @@ mod tests { } }"#; - let commit_ref = CommitRef::new(payload); + let commit_ref = CommitRef::new(payload) + .expect("Failed to create CommitRef from payload"); assert_eq!(commit_ref.owner, "baxterthehacker"); assert_eq!(commit_ref.repo, "public-repo"); -- cgit v1.2.3