blob: 1a4478124a45afdbdf7dca79fe8a3cc328e78094 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
use askama::Template;
#[derive(Template)]
#[template(path = "if-coerce.html")]
struct IfCoerceTemplate {
t: bool,
f: bool,
}
#[test]
fn test_coerce() {
let t = IfCoerceTemplate { t: true, f: false };
assert_eq!(t.render().unwrap(), "ftftfttftelseifelseif");
}
|