From fb11c175b27564a208148c0734200af0d981a0c8 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 15 Aug 2017 07:46:57 +0200 Subject: Add test for let blocks --- testing/tests/vars.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 testing/tests/vars.rs (limited to 'testing/tests') 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"); +} -- cgit