diff options
Diffstat (limited to 'testing/tests/vars.rs')
-rw-r--r-- | testing/tests/vars.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/tests/vars.rs b/testing/tests/vars.rs new file mode 100644 index 0000000..53e3397 --- /dev/null +++ b/testing/tests/vars.rs @@ -0,0 +1,16 @@ +#[macro_use] +extern crate askama; + +use askama::Template; + +#[derive(Template)] +#[template(path = "let.html")] +struct LetTemplate<'a> { + s: &'a str, +} + +#[test] +fn test_let() { + let t = LetTemplate { s: "foo" }; + assert_eq!(t.render().unwrap(), "foo"); +} |