diff options
Diffstat (limited to 'testing/tests/inheritance.rs')
-rw-r--r-- | testing/tests/inheritance.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index 5d8aefb..906be04 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -340,3 +340,15 @@ fn test_let_block() { let t = LetChild {}; assert_eq!(t.render().unwrap(), "1"); } + +#[derive(Template)] +#[template(path = "named-end.html")] +struct NamedBlocks<'a> { + title: &'a str, +} + +#[test] +fn test_named_end() { + let n = NamedBlocks { title: "title" }; + assert_eq!(n.render().unwrap(), "title\n\ntadam\nCopyright 2017"); +} |