aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-02 20:59:30 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-02 20:59:30 +0200
commit8ff2e316c07b4fd4373dd8a0bb5747bef3372a32 (patch)
tree5147b0be34fc45641d5e296c3020e91e6fec6f42 /testing/tests
parent91fe53d9b5db7ace5f82889a174ef5061a049771 (diff)
parentce84543b69b69ab2030ce4daeae3f26d5008b11d (diff)
downloadaskama-8ff2e316c07b4fd4373dd8a0bb5747bef3372a32.tar.gz
askama-8ff2e316c07b4fd4373dd8a0bb5747bef3372a32.tar.bz2
askama-8ff2e316c07b4fd4373dd8a0bb5747bef3372a32.zip
Merge changes
Diffstat (limited to '')
-rw-r--r--testing/tests/simple.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs
index 6d8afa3..c924e85 100644
--- a/testing/tests/simple.rs
+++ b/testing/tests/simple.rs
@@ -93,6 +93,25 @@ fn test_attr() {
}
+struct NestedHolder {
+ holder: Holder,
+}
+
+#[derive(Template)]
+#[template(path = "nested-attr.html")]
+struct NestedAttrTemplate {
+ inner: NestedHolder,
+}
+
+#[test]
+fn test_nested_attr() {
+ let t = NestedAttrTemplate {
+ inner: NestedHolder { holder: Holder { a: 5 } }
+ };
+ assert_eq!(t.render(), "5");
+}
+
+
#[derive(Template)]
#[template(path = "option.html")]
struct OptionTemplate<'a> {