aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorkhai96_ <hvksmr1996@gmail.com>2019-04-28 07:02:22 +0000
committerkhai96_ <hvksmr1996@gmail.com>2019-04-28 07:02:22 +0000
commit568e973fa937146b17278cc651b9da394feb89bf (patch)
tree29bc750e65c43d82e671ee378fe19de5e2a1aab1 /tests
parentAdd hashed password to integration test (diff)
downloadminiserve-568e973fa937146b17278cc651b9da394feb89bf.tar.gz
miniserve-568e973fa937146b17278cc651b9da394feb89bf.zip
Use fixtures
Diffstat (limited to 'tests')
-rw-r--r--tests/cli.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/cli.rs b/tests/cli.rs
index 49a1309..a67f5de 100644
--- a/tests/cli.rs
+++ b/tests/cli.rs
@@ -90,10 +90,13 @@ fn serves_requests_with_non_default_port(tmpdir: TempDir, port: u16) -> Result<(
"testpassword"
),
)]
-fn auth_works(cli_auth_arg: &str, client_username: &str, client_password: &str) -> Result<(), Error> {
- let tmpdir = self::tmpdir();
- let port = self::port();
-
+fn auth_works(
+ tmpdir: TempDir,
+ port: u16,
+ cli_auth_arg: &str,
+ client_username: &str,
+ client_password: &str
+) -> Result<(), Error> {
let mut child = Command::cargo_bin("miniserve")?
.arg(tmpdir.path())
.arg("-p")