mirror of
https://github.com/YGGverse/agate.git
synced 2026-04-08 12:35:28 +00:00
add a test for the port check skip
This commit is contained in:
parent
2f52157c73
commit
da584ef214
1 changed files with 19 additions and 0 deletions
|
|
@ -372,6 +372,25 @@ fn port_check() {
|
||||||
assert_eq!(page.header.status, Status::ProxyRequestRefused);
|
assert_eq!(page.header.status, Status::ProxyRequestRefused);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
/// - port is not checked if the skip option is passed.
|
||||||
|
fn port_check_skipped() {
|
||||||
|
let page = get(
|
||||||
|
&[
|
||||||
|
"--addr",
|
||||||
|
"[::]:19720",
|
||||||
|
"--hostname",
|
||||||
|
"example.org",
|
||||||
|
"--skip-port-check",
|
||||||
|
],
|
||||||
|
addr(19720),
|
||||||
|
"gemini://example.org:1971/",
|
||||||
|
)
|
||||||
|
.expect("could not get page");
|
||||||
|
|
||||||
|
assert_eq!(page.header.status, Status::Success);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
/// - status for paths with hidden segments is "gone" if file does not exist
|
/// - status for paths with hidden segments is "gone" if file does not exist
|
||||||
fn secret_nonexistent() {
|
fn secret_nonexistent() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue