aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-04 09:41:10 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-07-04 09:41:10 +0200
commit9d2c6115dc7e4ec2c24ce30581d3bf00f787e441 (patch)
tree1b43a019dae721c39136e9f5b8b1859b0ee42226 /testing/tests
parent191e56a5304b5bce27b6db14335d54d293839681 (diff)
downloadaskama-9d2c6115dc7e4ec2c24ce30581d3bf00f787e441.tar.gz
askama-9d2c6115dc7e4ec2c24ce30581d3bf00f787e441.tar.bz2
askama-9d2c6115dc7e4ec2c24ce30581d3bf00f787e441.zip
Add test for unit structs (see #101)
Diffstat (limited to 'testing/tests')
-rw-r--r--testing/tests/simple.rs9
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");
+}