about summary refs log tree commit diff
path: root/src/tests.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2019-02-26T15·21+0100
committerVincent Ambo <mail@tazj.in>2019-02-26T16·30+0100
commitbd726c7d4c0b32af26d338e6c33f9fb8a7d80171 (patch)
tree4c5e4e276e7d9e761acdf075627428d64ec15145 /src/tests.rs
parent415e930a07d8c3ae481a2c9e9efc0f1ea938bd5f (diff)
feat: Add Response::is_success utility method
Diffstat (limited to 'src/tests.rs')
-rw-r--r--src/tests.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests.rs b/src/tests.rs
index 8067e7cf66e4..cc44ca7b53a0 100644
--- a/src/tests.rs
+++ b/src/tests.rs
@@ -9,7 +9,7 @@ fn test_http_get() {
     let resp = Request::new(Method::Get, "https://httpbin.org/get")
         .send().expect("failed to send request");
 
-    assert_eq!(200, resp.status, "response status should be 200 OK");
+    assert!(resp.is_success(), "request should have succeeded");
 }
 
 #[test]