aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-12 12:06:18 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-12 12:06:18 +0100
commit4691cf3559f73cadb6d31c307c72f82aa6eb43da (patch)
tree6193c3574415dfd0f8b2d126d8010442cb7b4b99
parent24946f06836b433c1397b142999148d253058298 (diff)
downloadaskama-4691cf3559f73cadb6d31c307c72f82aa6eb43da.tar.gz
askama-4691cf3559f73cadb6d31c307c72f82aa6eb43da.tar.bz2
askama-4691cf3559f73cadb6d31c307c72f82aa6eb43da.zip
Add test for using base template directly
-rw-r--r--testing/tests/inheritance.rs6
1 files changed, 6 insertions, 0 deletions
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
@@ -13,6 +13,12 @@ struct BaseTemplate { }
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 { };
assert_eq!(t.render(), "Content goes here\nCopyright 2017\n");