summaryrefslogtreecommitdiff
path: root/src/render.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/render.rs')
-rw-r--r--src/render.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/render.rs b/src/render.rs
index 8e1ee1e..dea7e28 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -96,17 +96,17 @@ mod tests {
assert!(caddy.contains("https://home.example.net:8443"));
assert!(caddy.contains("http_port 8181"));
assert!(!caddy.contains("do-not-publish"));
- assert!(
- fs::read_to_string(output.join("web/index.html"))?
- .contains("https://git.example.net:8443")
- );
+ let homepage = fs::read_to_string(output.join("web/index.html"))?;
+ assert!(homepage.contains("https://git.example.net:8443"));
+ let stylesheet = files::hash_file(&root.path().join("web/styles.css"))?;
+ assert!(homepage.contains(&format!("/styles.css?v={stylesheet}")));
+ assert!(homepage.contains("https://chat.doan.luuduct.ai:8443/LIMITATIONS.txt"));
settings.mode = Mode::Local;
settings.port = 8180;
prepare(&project, &settings)?;
- assert!(
- fs::read_to_string(directory(&project, &settings).join("web/index.html"))?
- .contains("href=\"/git/\"")
- );
+ let preview = fs::read_to_string(directory(&project, &settings).join("web/index.html"))?;
+ assert!(preview.contains("href=\"/git/\""));
+ assert!(preview.contains("http://chat.localhost:8180/LIMITATIONS.txt"));
assert!(
fs::read_to_string(directory(&project, &settings).join("cgitrc"))?
.contains("clone-prefix=http://localhost:8180/git")