Fix failing template related tests in Go 1.6

Fixes #1470
This commit is contained in:
Bjørn Erik Pedersen 2015-12-18 15:28:43 +01:00
parent 8cea428802
commit 9edc58a03a

View file

@ -146,10 +146,11 @@ func TestRenderThing(t *testing.T) {
{SIMPLE_PAGE_RFC3339_DATE, TEMPLATE_DATE, "2013-05-17 16:59:30 +0000 UTC"},
}
s := new(Site)
templatePrep(s)
for i, test := range tests {
s := new(Site)
templatePrep(s)
p, err := NewPageFrom(strings.NewReader(test.content), "content/a/file.md")
p.Convert()
if err != nil {
@ -192,10 +193,12 @@ func TestRenderThingOrDefault(t *testing.T) {
}
hugofs.DestinationFS = new(afero.MemMapFs)
s := &Site{}
templatePrep(s)
for i, test := range tests {
s := &Site{}
templatePrep(s)
p, err := NewPageFrom(strings.NewReader(PAGE_SIMPLE_TITLE), "content/a/file.md")
if err != nil {
t.Fatalf("Error parsing buffer: %s", err)