SHE LIVES!

This commit is contained in:
2025-02-13 15:08:59 -05:00
parent d2e6c51073
commit 09dc73663d
11 changed files with 573 additions and 80 deletions

View File

@@ -49,9 +49,9 @@ mod tests {
let page1 = template("this is the first page");
let page2 = template("this is the second page");
let page3 = template("this is the third page");
let app = page1.route("page1") // route GET /page1
.or(page2.route("page2")) // route GET /page2
.or(router::route("page_num").then(page3.route("3"))); // route GET /page_num/3
let app = page1.route_at("page1") // route GET /page1
.or(page2.route_at("page2")) // route GET /page2
.or(router::route("page_num").then(page3.route_at("3"))); // route GET /page_num/3
let mut output = output::DummyOutput::new();
app.get("https://web.app/page1").unwrap().render(&mut output, &mut ());
assert_eq!(output.spool(), r#"<!DOCTYPE html><html><head><meta charset="utf-8"/><title>My Webpage</title></head><body><div><h1>My Test Website</h1>this is the first page</div></body></html>"#);