mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 13:30:59 +00:00
15 lines
302 B
Rust
15 lines
302 B
Rust
use askama::Template;
|
|
|
|
#[test]
|
|
fn test_coerce() {
|
|
#[derive(Template)]
|
|
#[template(path = "if-coerce.html")]
|
|
struct IfCoerceTemplate {
|
|
t: bool,
|
|
f: bool,
|
|
}
|
|
|
|
let t = IfCoerceTemplate { t: true, f: false };
|
|
assert_eq!(t.render().unwrap(), "ftftfttftelseifelseif");
|
|
}
|