Skip to content

Commit

Permalink
hugolib: Add more summary test
Browse files Browse the repository at this point in the history
Closes #2973
  • Loading branch information
bep committed Jun 28, 2017
1 parent 118f8f7 commit 72fd871
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions hugolib/page_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,29 @@ func TestPageWithMoreTagOnlySummary(t *testing.T) {
testAllMarkdownEnginesForPages(t, assertFunc, nil, simplePageWithSummaryDelimiterOnlySummary)
}

// #2973
func TestSummaryWithHTMLTagsOnNextLine(t *testing.T) {

assertFunc := func(t *testing.T, ext string, pages Pages) {
p := pages[0]
require.Contains(t, p.Summary, "Happy new year everyone!")
require.NotContains(t, p.Summary, "User interface")
}

testAllMarkdownEnginesForPages(t, assertFunc, nil, `---
title: Simple
---
Happy new year everyone!
Here is the last report for commits in the year 2016. It covers hrev50718-hrev50829.
<!--more-->
<h3>User interface</h3>
`)
}

func TestPageWithDate(t *testing.T) {
t.Parallel()
cfg, fs := newTestCfg()
Expand Down

0 comments on commit 72fd871

Please sign in to comment.