mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 18:12:08 -05:00
Updating shortcode imports & site test to work with new buffer pool functions
This commit is contained in:
parent
e1e6aaed2f
commit
f4737689bd
2 changed files with 3 additions and 7 deletions
|
@ -14,7 +14,6 @@
|
|||
package hugolib
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"reflect"
|
||||
|
|
|
@ -178,19 +178,16 @@ func TestRenderThingOrDefault(t *testing.T) {
|
|||
}
|
||||
|
||||
var err2 error
|
||||
var b io.Reader
|
||||
|
||||
if test.missing {
|
||||
b, err2 = s.renderPage("name", p, "missing", templateName)
|
||||
err2 = s.renderAndWritePage("name", "out", p, "missing", templateName)
|
||||
} else {
|
||||
b, err2 = s.renderPage("name", p, templateName, "missing_default")
|
||||
err2 = s.renderAndWritePage("name", "out", p, templateName, "missing_default")
|
||||
}
|
||||
|
||||
if err2 != nil {
|
||||
t.Errorf("Unable to render html: %s", err)
|
||||
}
|
||||
if err2 := s.WriteDestPage("out", b); err2 != nil {
|
||||
t.Errorf("Unable to write html: %s", err)
|
||||
}
|
||||
|
||||
file, err := hugofs.DestinationFS.Open(filepath.FromSlash("out/index.html"))
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue