From 4691cf3559f73cadb6d31c307c72f82aa6eb43da Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 12 Feb 2017 12:06:18 +0100 Subject: Add test for using base template directly --- testing/tests/inheritance.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'testing') diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index ebcca70..5d5c23c 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -12,6 +12,12 @@ struct BaseTemplate { } #[template(path = "child.html")] struct ChildTemplate { } +#[test] +fn test_use_base_directly() { + let t = BaseTemplate {}; + assert_eq!(t.render(), "\nCopyright 2017\n"); +} + #[test] fn test_simple_extends() { let t = ChildTemplate { }; -- cgit