aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/templates/rust-macros.html2
-rw-r--r--testing/tests/rust_macro.rs8
2 files changed, 4 insertions, 6 deletions
diff --git a/testing/templates/rust-macros.html b/testing/templates/rust-macros.html
index dc0b3de..c6998c6 100644
--- a/testing/templates/rust-macros.html
+++ b/testing/templates/rust-macros.html
@@ -1 +1 @@
-Hello, {{ hello!(name) }}!
+Hello, {{ hello!() }}!
diff --git a/testing/tests/rust_macro.rs b/testing/tests/rust_macro.rs
index c6e97ce..a9924db 100644
--- a/testing/tests/rust_macro.rs
+++ b/testing/tests/rust_macro.rs
@@ -4,19 +4,17 @@ extern crate askama;
use askama::Template;
macro_rules! hello {
- ($name:expr) => {
+ () => {
"world"
}
}
#[derive(Template)]
#[template(path = "rust-macros.html")]
-struct RustMacrosTemplate<'a> {
- name: &'a str,
-}
+struct RustMacrosTemplate {}
#[test]
fn main() {
- let template = RustMacrosTemplate { name: "foo" };
+ let template = RustMacrosTemplate {};
assert_eq!("Hello, world!", template.render().unwrap());
}