SHE LIVES!
This commit is contained in:
@@ -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>"#);
|
||||
|
||||
Reference in New Issue
Block a user