added two tests to cover static wildcards

This commit is contained in:
epi
2020-10-09 15:34:33 -05:00
parent ec1458cdc3
commit 8d335d7e90

View File

@@ -245,7 +245,9 @@ fn heuristics_wildcard_test_with_two_static_wildcards() -> Result<(), Box<dyn st
.and(predicate::str::contains("200"))
.and(predicate::str::contains("(url length: 32)"))
.and(predicate::str::contains("(url length: 96)"))
.and(predicate::str::contains("Wildcard response is static; auto-filtering 46")),
.and(predicate::str::contains(
"Wildcard response is static; auto-filtering 46",
)),
);
assert_eq!(mock.times_called(), 1);
@@ -255,7 +257,8 @@ fn heuristics_wildcard_test_with_two_static_wildcards() -> Result<(), Box<dyn st
#[test]
/// test finds a static wildcard and only reports the url to stdout
fn heuristics_wildcard_test_with_two_static_wildcards_with_quiet_enabled() -> Result<(), Box<dyn std::error::Error>> {
fn heuristics_wildcard_test_with_two_static_wildcards_with_quiet_enabled(
) -> Result<(), Box<dyn std::error::Error>> {
let srv = MockServer::start();
let (tmp_dir, file) = setup_tmp_directory(&["LICENSE".to_string()], "wordlist")?;
@@ -287,7 +290,6 @@ fn heuristics_wildcard_test_with_two_static_wildcards_with_quiet_enabled() -> Re
cmd.assert().success().stdout(predicate::str::is_empty());
assert_eq!(mock.times_called(), 1);
assert_eq!(mock2.times_called(), 1);
Ok(())