mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
Consolidate the Render funcs
This commit is contained in:
@@ -289,10 +289,10 @@ func TestGetMarkdownRenderer(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetMarkdownRendererWithTOC(t *testing.T) {
|
||||
ctx := &RenderingContext{}
|
||||
ctx := &RenderingContext{RenderTOC: true}
|
||||
ctx.Content = []byte("testContent")
|
||||
ctx.Config = ctx.getConfig()
|
||||
actualRenderedMarkdown := markdownRenderWithTOC(ctx)
|
||||
actualRenderedMarkdown := markdownRender(ctx)
|
||||
expectedRenderedMarkdown := []byte("<nav>\n</nav>\n\n<p>testContent</p>\n")
|
||||
if !bytes.Equal(actualRenderedMarkdown, expectedRenderedMarkdown) {
|
||||
t.Errorf("Actual rendered Markdown (%s) did not match expected markdown (%s)", actualRenderedMarkdown, expectedRenderedMarkdown)
|
||||
|
Reference in New Issue
Block a user