Skip to content

Commit 635106c

Browse files
Add landing page test
This guards against any future refactor accidentally leaving a raw {{VERSION}} or {{COMMIT}} in the response. Co-authored-by: carlos santos <rickhenriquetab@gmail.com>
1 parent 4591182 commit 635106c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

payjoin-mailroom/src/directory.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,4 +793,13 @@ mod tests {
793793
assert_eq!(status, StatusCode::OK);
794794
assert_eq!(body, r#"{"versions":[1,2]}"#);
795795
}
796+
797+
// Landing page
798+
799+
#[test]
800+
fn landing_page_contains_version() {
801+
let html = landing_page_html();
802+
assert!(!html.contains("{{VERSION}}"));
803+
assert!(!html.contains("{{COMMIT}}"));
804+
}
796805
}

0 commit comments

Comments
 (0)