diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 9a797725f2..7ad7324a1e 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -1035,7 +1035,6 @@ mod tests { assert!(!permalink_url.path().starts_with("//")); assert!(!permalink_url.path().ends_with("//")); assert!(permalink_url.path().starts_with("/")); - assert!(permalink_url.path().ends_with("/")); assert!(permalink_url.path().starts_with(base_url.path())); } } @@ -1048,7 +1047,7 @@ mod tests { let base_url: Option = None; let no_port_append = false; let ws_port: Option = None; - let expected_base_url = String::from("http://127.0.0.1:1111/"); + let expected_base_url = String::from("http://127.0.0.1:1111"); create_and_verify_new_site( interface, @@ -1069,7 +1068,7 @@ mod tests { let base_url: Option = Some(String::from("localhost/path/to/site")); let no_port_append = false; let ws_port: Option = None; - let expected_base_url = String::from("http://localhost:1111/path/to/site/"); + let expected_base_url = String::from("http://localhost:1111/path/to/site"); create_and_verify_new_site( interface, @@ -1090,7 +1089,7 @@ mod tests { let base_url: Option = Some(String::from("example.com")); let no_port_append = true; let ws_port: Option = None; - let expected_base_url = String::from("http://example.com/"); + let expected_base_url = String::from("http://example.com"); // Note that no_port_append only works if we define a base_url @@ -1113,7 +1112,7 @@ mod tests { let base_url: Option = Some(String::from("https://example.com")); let no_port_append = true; let ws_port: Option = None; - let expected_base_url = String::from("https://example.com/"); + let expected_base_url = String::from("https://example.com"); // Note that no_port_append only works if we define a base_url @@ -1136,7 +1135,7 @@ mod tests { let base_url: Option = Some(String::from("https://example.com/path/to/site")); let no_port_append = true; let ws_port: Option = None; - let expected_base_url = String::from("https://example.com/path/to/site/"); + let expected_base_url = String::from("https://example.com/path/to/site"); // Note that no_port_append only works if we define a base_url @@ -1159,7 +1158,7 @@ mod tests { let base_url: Option = Some(String::from("https://example.com/path/to/site")); let no_port_append = false; let ws_port: Option = None; - let expected_base_url = String::from("https://example.com:1111/path/to/site/"); + let expected_base_url = String::from("https://example.com:1111/path/to/site"); // Note that no_port_append only works if we define a base_url