From 9d2c6115dc7e4ec2c24ce30581d3bf00f787e441 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 4 Jul 2018 09:41:10 +0200 Subject: Add test for unit structs (see #101) --- testing/tests/simple.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'testing') 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"); +} -- cgit