diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-07-04 09:41:10 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-07-04 09:41:10 +0200 |
commit | 9d2c6115dc7e4ec2c24ce30581d3bf00f787e441 (patch) | |
tree | 1b43a019dae721c39136e9f5b8b1859b0ee42226 | |
parent | 191e56a5304b5bce27b6db14335d54d293839681 (diff) | |
download | askama-9d2c6115dc7e4ec2c24ce30581d3bf00f787e441.tar.gz askama-9d2c6115dc7e4ec2c24ce30581d3bf00f787e441.tar.bz2 askama-9d2c6115dc7e4ec2c24ce30581d3bf00f787e441.zip |
Add test for unit structs (see #101)
Diffstat (limited to '')
-rw-r--r-- | testing/tests/simple.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index 53cb03e..95c14b1 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -249,3 +249,12 @@ fn test_index() { let t = IndexTemplate { foo }; assert_eq!(t.render().unwrap(), "baz"); } + +#[derive(Template)] +#[template(source = "foo", ext = "txt")] +struct Empty; + +#[test] +fn test_empty() { + assert_eq!(Empty.render().unwrap(), "foo"); +} |