diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index 906be046..87232b37 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -331,6 +331,12 @@ fn test_flat_deep() { #[template(path = "let-base.html")] struct LetBase {} +#[test] +fn test_let_base() { + let t = LetBase {}; + assert_eq!(t.render().unwrap(), ""); +} + #[derive(Template)] #[template(path = "let-child.html")] struct LetChild {} diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index a155fac3..40121288 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -350,6 +350,12 @@ impl FunctionTemplate { } } +#[test] +fn test_fn() { + let t = FunctionTemplate; + assert_eq!(t.render().unwrap(), "Hello, world1234!"); +} + #[derive(Template)] #[template(source = " {# foo -#} ", ext = "txt")] struct CommentTemplate {}