aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2023-08-21 03:08:39 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2023-08-21 03:08:39 +0000
commitf136bf77e13c6cfff7f269322eadb8d54c92ea4d (patch)
tree2749292cbd753134a5c671f2c3a7f7f6f626f852
parentMerge pull request #1179 from proudmuslim-dev/master (diff)
downloadminiserve-f136bf77e13c6cfff7f269322eadb8d54c92ea4d.tar.gz
miniserve-f136bf77e13c6cfff7f269322eadb8d54c92ea4d.zip
Fix formatting
-rw-r--r--tests/auth_file.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auth_file.rs b/tests/auth_file.rs
index e022a3d..ddc9e25 100644
--- a/tests/auth_file.rs
+++ b/tests/auth_file.rs
@@ -8,15 +8,17 @@ use select::document::Document;
use select::predicate::Text;
#[rstest(
- cli_auth_file_arg, client_username, client_password,
+ cli_auth_file_arg,
+ client_username,
+ client_password,
case("tests/data/auth1.txt", "joe", "123"),
case("tests/data/auth1.txt", "bob", "123"),
- case("tests/data/auth1.txt", "bill", ""),
+ case("tests/data/auth1.txt", "bill", "")
)]
fn auth_file_accepts(
cli_auth_file_arg: &str,
client_username: &str,
- client_password: &str
+ client_password: &str,
) -> Result<(), Error> {
let server = server(&["--auth-file", cli_auth_file_arg]);
let client = Client::new();
@@ -32,16 +34,18 @@ fn auth_file_accepts(
let parsed = Document::from_read(body)?;
for &file in FILES {
assert!(parsed.find(Text).any(|x| x.text() == file));
- }
+ }
Ok(())
}
#[rstest(
- cli_auth_file_arg, client_username, client_password,
+ cli_auth_file_arg,
+ client_username,
+ client_password,
case("tests/data/auth1.txt", "joe", "wrongpassword"),
case("tests/data/auth1.txt", "bob", ""),
- case("tests/data/auth1.txt", "nonexistentuser", "wrongpassword"),
+ case("tests/data/auth1.txt", "nonexistentuser", "wrongpassword")
)]
fn auth_file_rejects(
cli_auth_file_arg: &str,