Skip to content

Commit

Permalink
Fix tests with new default config
Browse files Browse the repository at this point in the history
  • Loading branch information
p1gp1g committed Nov 17, 2023
1 parent b0eb99e commit 9c3252e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,21 @@ mod tests {
async fn check_endpoint() {
let cfg = test_config("*");
assert!(
cfg.is_url_endpoint_valid(&url::Url::parse("http://0.0.0.0/foo?blah").unwrap())
cfg.is_url_endpoint_valid(&url::Url::parse("https://ntfy.sh/foo?blah").unwrap())
.await
);
assert!(
!cfg.is_url_endpoint_valid(&url::Url::parse("http://0.0.0.0:8080/foo?blah").unwrap())
!cfg.is_url_endpoint_valid(&url::Url::parse("https://ntfy.sh:8080/foo?blah").unwrap())
.await
);
assert!(
!cfg.is_url_endpoint_valid(
&url::Url::parse("http://user:pass@0.0.0.0/foo?blah").unwrap()
&url::Url::parse("https://user:pass@ntfy.sh/foo?blah").unwrap()
)
.await
);
assert!(
!cfg.is_url_endpoint_valid(&url::Url::parse("https://0.0.0.0/foo?blah").unwrap())
!cfg.is_url_endpoint_valid(&url::Url::parse("http://ntfy.sh/foo?blah").unwrap())
.await
);
}
Expand Down

0 comments on commit 9c3252e

Please sign in to comment.