mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
Silence chatty JSON test
This commit is contained in:
@@ -2,7 +2,6 @@ package hugolib
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -15,14 +14,11 @@ func TestEncodePage(t *testing.T) {
|
|||||||
s := createTestSite(MENU_PAGE_SOURCES)
|
s := createTestSite(MENU_PAGE_SOURCES)
|
||||||
testSiteSetup(s, t)
|
testSiteSetup(s, t)
|
||||||
|
|
||||||
j, err := json.Marshal(s)
|
_, err := json.Marshal(s)
|
||||||
check(t, err)
|
check(t, err)
|
||||||
fmt.Println("Site as JSON", string(j))
|
|
||||||
|
|
||||||
p, err := json.Marshal(s.Pages[0])
|
_, err = json.Marshal(s.Pages[0])
|
||||||
check(t, err)
|
check(t, err)
|
||||||
fmt.Println("Page as JSON", string(p))
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func check(t *testing.T, err error) {
|
func check(t *testing.T, err error) {
|
||||||
|
Reference in New Issue
Block a user