diff options
-rw-r--r-- | testing/tests/simple.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/tests/simple.rs b/testing/tests/simple.rs index 8fd61d2..a05b956 100644 --- a/testing/tests/simple.rs +++ b/testing/tests/simple.rs @@ -220,3 +220,16 @@ fn test_unescaped() { let t = UnescapedTemplate { foo: "foo & bar" }; assert_eq!(t.render().unwrap(), "foo & bar"); } + + +#[derive(Template)] +#[template(path = "hello.html")] +struct PathBasedEscapedTemplate<'a> { + name: &'a str, +} + +#[test] +fn test_path_based_escaped() { + let t = PathBasedEscapedTemplate { name: "you & me" }; + assert_eq!(t.render().unwrap(), "Hello, you & me!"); +} |