Add tests for custom url scheme

This commit is contained in:
Vincent Prouillet 2019-07-15 20:18:24 +02:00
parent 0585a1f59b
commit af00a2e8f1

View file

@ -819,3 +819,15 @@ fn doesnt_try_to_highlight_content_from_shortcode() {
// let res = render_content(markdown_string, &context).unwrap();
// assert_eq!(res.body, expected);
//}
// https://github.com/getzola/zola/issues/747
#[test]
fn leaves_custom_url_scheme_untouched() {
let tera_ctx = Tera::default();
let permalinks_ctx = HashMap::new();
let config = Config::default();
let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, InsertAnchor::None);
let res = render_content("[foo@bar.tld](xmpp:foo@bar.tld)", &context).unwrap();
assert_eq!(res.body, "<p><a href=\"xmpp:foo@bar.tld\">foo@bar.tld</a></p>\n");
}