From 5c4896acf46bb4a2737c165f07fb603727d96452 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 12 Jan 2020 16:02:27 +0100 Subject: Add test for let declarations in blocks --- testing/tests/inheritance.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'testing') 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() { " ); } + +#[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 -- cgit