From c53c4037900ec484519ee8169477f3d3ac2bceb5 Mon Sep 17 00:00:00 2001 From: Thomas Hurst Date: Fri, 24 Aug 2018 22:37:55 +0100 Subject: [PATCH] Update rendering tests --- components/rendering/tests/markdown.rs | 76 +++++++++++++------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/components/rendering/tests/markdown.rs b/components/rendering/tests/markdown.rs index 93e6f64..a396951 100644 --- a/components/rendering/tests/markdown.rs +++ b/components/rendering/tests/markdown.rs @@ -22,7 +22,7 @@ fn can_do_render_content_simple() { let config = Config::default(); let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, Path::new("something"), InsertAnchor::None); let res = render_content("hello", &context).unwrap(); - assert_eq!(res.0, "

hello

\n"); + assert_eq!(res.body, "

hello

\n"); } #[test] @@ -34,7 +34,7 @@ fn doesnt_highlight_code_block_with_highlighting_off() { let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, Path::new("something"), InsertAnchor::None); let res = render_content("```\n$ gutenberg server\n```", &context).unwrap(); assert_eq!( - res.0, + res.body, "
$ gutenberg server\n
\n" ); } @@ -47,7 +47,7 @@ fn can_highlight_code_block_no_lang() { let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, Path::new("something"), InsertAnchor::None); let res = render_content("```\n$ gutenberg server\n$ ping\n```", &context).unwrap(); assert_eq!( - res.0, + res.body, "
\n$ gutenberg server\n$ ping\n
" ); } @@ -60,7 +60,7 @@ fn can_highlight_code_block_with_lang() { let context = RenderContext::new(&tera_ctx, &config, "", &permalinks_ctx, Path::new("something"), InsertAnchor::None); let res = render_content("```python\nlist.append(1)\n```", &context).unwrap(); assert_eq!( - res.0, + res.body, "
\nlist.append(1)\n
" ); } @@ -74,7 +74,7 @@ fn can_higlight_code_block_with_unknown_lang() { let res = render_content("```yolo\nlist.append(1)\n```", &context).unwrap(); // defaults to plain text assert_eq!( - res.0, + res.body, "
\nlist.append(1)\n
" ); } @@ -89,8 +89,8 @@ Hello {{ youtube(id="ub36ffWAqgQ") }} "#, &context).unwrap(); - assert!(res.0.contains("

Hello

\n
")); - assert!(res.0.contains(r#"