mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +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);
|
||||
}
|
||||
|
||||
#[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]
|
||||
/// - status for paths with hidden segments is "gone" if file does not exist
|
||||
fn secret_nonexistent() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue