From 568e973fa937146b17278cc651b9da394feb89bf Mon Sep 17 00:00:00 2001 From: khai96_ Date: Sun, 28 Apr 2019 14:02:22 +0700 Subject: Use fixtures --- tests/cli.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/cli.rs') 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") -- cgit v1.2.3