diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-08-15 07:46:57 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-08-15 07:47:02 +0200 |
commit | fb11c175b27564a208148c0734200af0d981a0c8 (patch) | |
tree | c8cdf812bb8358849768a6bf45a2cb9e7aecf321 /testing/tests/vars.rs | |
parent | 34fd0c07de86ff338e261a6454bad88661c07b2e (diff) | |
download | askama-fb11c175b27564a208148c0734200af0d981a0c8.tar.gz askama-fb11c175b27564a208148c0734200af0d981a0c8.tar.bz2 askama-fb11c175b27564a208148c0734200af0d981a0c8.zip |
Add test for let blocks
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"); +} |