diff options
author | khai96_ <hvksmr1996@gmail.com> | 2019-05-06 13:58:22 +0000 |
---|---|---|
committer | khai96_ <hvksmr1996@gmail.com> | 2019-05-06 13:58:22 +0000 |
commit | d3d90f1b46c441f4bd9066d671bc2119665f2f1e (patch) | |
tree | 6d29d5f3e60eef5eff0a9df94a57fed87883c5d1 /tests/auth.rs | |
parent | Add integration test where it rejects authentication (diff) | |
download | miniserve-d3d90f1b46c441f4bd9066d671bc2119665f2f1e.tar.gz miniserve-d3d90f1b46c441f4bd9066d671bc2119665f2f1e.zip |
Use constant for assertion
Diffstat (limited to 'tests/auth.rs')
-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 e52df52..96cdcb5 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, @@ -108,7 +109,7 @@ fn auth_rejects( .send()? .status(); - assert_eq!(status.canonical_reason(), Some("Unauthorized")); + assert_eq!(status, StatusCode::UNAUTHORIZED); child.kill()?; |