Browse Source

Add tests for custom url scheme

index-subcmd
Vincent Prouillet 5 years ago
parent
commit
af00a2e8f1
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      components/rendering/tests/markdown.rs

+ 12
- 0
components/rendering/tests/markdown.rs View File

@@ -819,3 +819,15 @@ fn doesnt_try_to_highlight_content_from_shortcode() {
// let res = render_content(markdown_string, &context).unwrap(); // let res = render_content(markdown_string, &context).unwrap();
// assert_eq!(res.body, expected); // 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");
}

Loading…
Cancel
Save