diff options
Diffstat (limited to '')
-rw-r--r-- | testing/tests/filters.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/tests/filters.rs b/testing/tests/filters.rs index d70d1c8..73b660a 100644 --- a/testing/tests/filters.rs +++ b/testing/tests/filters.rs @@ -18,3 +18,16 @@ fn filter_escape() { assert_eq!(s.render(), "my <html> is unsafe & should be escaped\n"); } + + +#[derive(Template)] +#[template(path = "format.html")] +struct FormatTemplate<'a> { + var: &'a str, +} + +#[test] +fn filter_format() { + let t = FormatTemplate { var: "formatted" }; + assert_eq!(t.render(), "\"formatted\"\n"); +} |