mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
@@ -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) {
|
||||
|
Reference in New Issue
Block a user