aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auth.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2019-05-01 07:13:13 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2019-05-01 07:13:13 +0000
commit1adab9d2f5d7863b6df32992ecb21dcea5b51d21 (patch)
tree2eda7658c659bb25c3e412b7c2d03d89b0226aa8 /tests/auth.rs
parentMerge pull request #91 from KSXGitHub/split-integration-test (diff)
downloadminiserve-1adab9d2f5d7863b6df32992ecb21dcea5b51d21.tar.gz
miniserve-1adab9d2f5d7863b6df32992ecb21dcea5b51d21.zip
Make tests into their own proper modules without star imports
Star imports make it hard to see which imports a module is actually using so I prefer to have this be a bit more explicit.
Diffstat (limited to 'tests/auth.rs')
-rw-r--r--tests/auth.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/auth.rs b/tests/auth.rs
index 48f070e..f43553b 100644
--- a/tests/auth.rs
+++ b/tests/auth.rs
@@ -1,5 +1,14 @@
mod fixtures;
-use fixtures::*;
+
+use assert_cmd::prelude::*;
+use assert_fs::fixture::TempDir;
+use fixtures::{port, tmpdir, Error, FILES};
+use rstest::rstest_parametrize;
+use select::document::Document;
+use select::predicate::Text;
+use std::process::{Command, Stdio};
+use std::thread::sleep;
+use std::time::Duration;
#[rstest_parametrize(
cli_auth_arg, client_username, client_password,
@@ -20,7 +29,7 @@ fn auth_works(
port: u16,
cli_auth_arg: &str,
client_username: &str,
- client_password: &str
+ client_password: &str,
) -> Result<(), Error> {
let mut child = Command::cargo_bin("miniserve")?
.arg(tmpdir.path())