commit da584ef2143d53ff5423e768c3f306257dac9259
parent 2f52157c73dfc91e747c8a0600d3126c3b4378a4
Author: dece <shgck@pistache.land>
Date: Fri, 11 Jun 2021 02:24:48 +0200
add a test for the port check skip
Diffstat:
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/tests/tests.rs b/tests/tests.rs
@@ -373,6 +373,25 @@ fn port_check() {
}
#[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() {
let page = get(