diff options
Diffstat (limited to 'testing/tests/inheritance.rs')
-rw-r--r-- | testing/tests/inheritance.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index 5d5c23c..156358e 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -10,7 +10,9 @@ struct BaseTemplate { } #[derive(Template)] #[template(path = "child.html")] -struct ChildTemplate { } +struct ChildTemplate { + _parent: BaseTemplate, +} #[test] fn test_use_base_directly() { @@ -20,6 +22,6 @@ fn test_use_base_directly() { #[test] fn test_simple_extends() { - let t = ChildTemplate { }; + let t = ChildTemplate { _parent: BaseTemplate {} }; assert_eq!(t.render(), "Content goes here\nCopyright 2017\n"); } |