blob: 4a556157714cce51205b6349833ca2c39ceed051 (
plain) (
tree)
|
|
#[macro_use]
extern crate askama;
use askama::Template;
#[derive(Template)]
#[template(path = "match.html")]
struct MatchTemplate<'a> {
item: Option<&'a str>,
}
#[test]
fn test_match_option() {
let s = MatchTemplate {
item: Some("foo"),
};
assert_eq!(s.render().unwrap(), "\n\nFound foo\n");
}
|