diff options
author | khai96_ <hvksmr1996@gmail.com> | 2019-05-06 14:02:19 +0000 |
---|---|---|
committer | khai96_ <hvksmr1996@gmail.com> | 2019-05-06 14:02:19 +0000 |
commit | 03b4cbad39e17cc6f083b77801177daba101d169 (patch) | |
tree | 88efb9067db5cf4e8df713d61bc4d83272a1596b | |
parent | Add assertion of status code to auth_works (diff) | |
download | miniserve-03b4cbad39e17cc6f083b77801177daba101d169.tar.gz miniserve-03b4cbad39e17cc6f083b77801177daba101d169.zip |
Use constant for assertion
-rw-r--r-- | tests/auth.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auth.rs b/tests/auth.rs index af2db58..9882a39 100644 --- a/tests/auth.rs +++ b/tests/auth.rs @@ -9,6 +9,7 @@ use select::predicate::Text; use std::process::{Command, Stdio}; use std::thread::sleep; use std::time::Duration; +use reqwest::StatusCode; #[rstest_parametrize( cli_auth_arg, client_username, client_password, @@ -49,7 +50,7 @@ fn auth_works( .send()?; let status_code = response.status(); - assert_eq!(status_code.canonical_reason(), Some("OK")); + assert_eq!(status_code, StatusCode::OK); let body = response.error_for_status()?; let parsed = Document::from_read(body)?; |