aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-01-12 16:02:27 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2020-01-12 16:06:42 +0100
commit5c4896acf46bb4a2737c165f07fb603727d96452 (patch)
tree645383ba5bbffcb503daef9ea00e53eba64cedb8 /testing
parente69b76132070bae48317a886b0aef9e51e6ea00d (diff)
downloadaskama-5c4896acf46bb4a2737c165f07fb603727d96452.tar.gz
askama-5c4896acf46bb4a2737c165f07fb603727d96452.tar.bz2
askama-5c4896acf46bb4a2737c165f07fb603727d96452.zip
Add test for let declarations in blocks
Diffstat (limited to 'testing')
-rw-r--r--testing/tests/inheritance.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs
index 32028c4..c007dce 100644
--- a/testing/tests/inheritance.rs
+++ b/testing/tests/inheritance.rs
@@ -290,3 +290,17 @@ fn test_flat_deep() {
</html>"
);
}
+
+#[derive(Template)]
+#[template(path = "let-base.html")]
+struct LetBase {}
+
+#[derive(Template)]
+#[template(path = "let-child.html")]
+struct LetChild {}
+
+#[test]
+fn test_let_block() {
+ let t = LetChild {};
+ assert_eq!(t.render().unwrap(), "1");
+} \ No newline at end of file