diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-01-12 16:02:27 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-01-12 16:06:42 +0100 |
commit | 5c4896acf46bb4a2737c165f07fb603727d96452 (patch) | |
tree | 645383ba5bbffcb503daef9ea00e53eba64cedb8 /testing | |
parent | e69b76132070bae48317a886b0aef9e51e6ea00d (diff) | |
download | askama-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.rs | 14 |
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 |