aboutsummaryrefslogtreecommitdiffstats
path: root/tests/archive.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/archive.rs')
-rw-r--r--tests/archive.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/archive.rs b/tests/archive.rs
index a8b5ed2..2e96797 100644
--- a/tests/archive.rs
+++ b/tests/archive.rs
@@ -1,19 +1,21 @@
-use reqwest::StatusCode;
+use reqwest::StatusCode;
use rstest::rstest;
use select::{document::Document, predicate::Text};
mod fixtures;
-use crate::fixtures::{server, Error, TestServer};
+use crate::fixtures::{Error, TestServer, server};
#[rstest]
fn archives_are_disabled(server: TestServer) -> Result<(), Error> {
// Ensure the links to the archives are not present
let body = reqwest::blocking::get(server.url())?.error_for_status()?;
let parsed = Document::from_read(body)?;
- assert!(parsed
- .find(Text)
- .all(|x| x.text() != "Download .tar.gz" && x.text() != "Download .tar"));
+ assert!(
+ parsed
+ .find(Text)
+ .all(|x| x.text() != "Download .tar.gz" && x.text() != "Download .tar")
+ );
// Try to download anyway, ensure it's forbidden
assert_eq!(
@@ -65,9 +67,11 @@ fn archives_are_disabled_when_indexing_disabled(
// Ensure the links to the archives are not present
let body = reqwest::blocking::get(server.url())?;
let parsed = Document::from_read(body)?;
- assert!(parsed
- .find(Text)
- .all(|x| x.text() != "Download .tar.gz" && x.text() != "Download .tar"));
+ assert!(
+ parsed
+ .find(Text)
+ .all(|x| x.text() != "Download .tar.gz" && x.text() != "Download .tar")
+ );
// Try to download anyway, ensure it's forbidden
// We assert for not found to make sure we aren't leaking information about directories that do exist.