aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests')
-rw-r--r--testing/tests/markdown.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/tests/markdown.rs b/testing/tests/markdown.rs
index 75163c9..04c9ec9 100644
--- a/testing/tests/markdown.rs
+++ b/testing/tests/markdown.rs
@@ -70,3 +70,21 @@ before\
after",
);
}
+
+#[derive(Template)]
+#[template(source = "{{content|markdown}}", ext = "html")]
+struct MarkdownStringTemplate {
+ content: String,
+}
+
+// Tests if the markdown filter accepts String
+#[test]
+fn test_markdown_owned_string() {
+ let template = MarkdownStringTemplate {
+ content: "The markdown filter _indeed_ works with __String__".into(),
+ };
+ assert_eq!(
+ template.render().unwrap(),
+ "<p>The markdown filter <em>indeed</em> works with <strong>String</strong></p>\n"
+ )
+}