diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/raw.rs | 4 | ||||
-rw-r--r-- | tests/utils/mod.rs | 12 |
2 files changed, 0 insertions, 16 deletions
diff --git a/tests/raw.rs b/tests/raw.rs index ed46314..ea9b3a6 100644 --- a/tests/raw.rs +++ b/tests/raw.rs @@ -2,7 +2,6 @@ mod fixtures; mod utils; use crate::fixtures::TestServer; -use assert_cmd::prelude::*; use fixtures::{server, Error}; use pretty_assertions::assert_eq; use reqwest::blocking::Client; @@ -10,9 +9,6 @@ use rstest::rstest; use select::document::Document; use select::predicate::Class; use select::predicate::Name; -use std::process::{Command, Stdio}; -use std::thread::sleep; -use std::time::Duration; #[rstest] /// The ui displays the correct wget command to download the folder recursively diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs deleted file mode 100644 index b724945..0000000 --- a/tests/utils/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -use select::document::Document; -use select::node::Node; -use select::predicate::Name; -use select::predicate::Predicate; - -/// Return the href attribute content for the closest anchor found by `text`. -pub fn get_link_from_text(document: &Document, text: &str) -> Option<String> { - let a_elem = document - .find(Name("a").and(|x: &Node| x.children().any(|x| x.text() == text))) - .next()?; - Some(a_elem.attr("href")?.to_string()) -} |