mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
0e79446586
commit
7c9fada778
80 changed files with 1273 additions and 1082 deletions
|
@ -16,6 +16,7 @@ package hugolib
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/bep/logg"
|
||||
qt "github.com/frankban/quicktest"
|
||||
"github.com/gohugoio/hugo/common/loggers"
|
||||
)
|
||||
|
@ -80,13 +81,13 @@ func TestRenderStringOnListPage(t *testing.T) {
|
|||
// Issue 9433
|
||||
func TestRenderStringOnPageNotBackedByAFile(t *testing.T) {
|
||||
t.Parallel()
|
||||
logger := loggers.NewWarningLogger()
|
||||
logger := loggers.NewDefault()
|
||||
b := newTestSitesBuilder(t).WithLogger(logger).WithConfigFile("toml", `
|
||||
disableKinds = ["page", "section", "taxonomy", "term"]
|
||||
`)
|
||||
b.WithTemplates("index.html", `{{ .RenderString "**Hello**" }}`).WithContent("p1.md", "")
|
||||
b.BuildE(BuildCfg{})
|
||||
b.Assert(int(logger.LogCounters().WarnCounter.Count()), qt.Equals, 0)
|
||||
b.Assert(logger.LoggCount(logg.LevelWarn), qt.Equals, 0)
|
||||
}
|
||||
|
||||
func TestRenderStringWithShortcode(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue