mirror of https://github.com/rwf2/Rocket.git
Rearrange formatting in cookies test.
This commit is contained in:
parent
da7026c781
commit
e2f342a384
|
@ -45,10 +45,9 @@ fn test_index() {
|
||||||
|
|
||||||
// Render the template with a context that contains the message.
|
// Render the template with a context that contains the message.
|
||||||
context.insert("message", "Hello from Rocket!");
|
context.insert("message", "Hello from Rocket!");
|
||||||
let template = Template::render("index", &context);
|
|
||||||
|
|
||||||
// Test the route with the "message" cookie.
|
// Test the route with the "message" cookie.
|
||||||
test_body(Some(Cookie::new("message".to_string(),
|
let cookie = Cookie::new("message".into(), "Hello from Rocket!".into());
|
||||||
"Hello from Rocket!".to_string())),
|
let template = Template::render("index", &context);
|
||||||
template.to_string());
|
test_body(Some(cookie), template.to_string());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue