1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

permitting empty files again. Fixing some tests to now pass.

This commit is contained in:
spf13
2014-05-01 14:11:56 -04:00
parent 3395e1cb92
commit fb7d45e613
10 changed files with 73 additions and 39 deletions

View File

@@ -74,7 +74,7 @@ date: 02 May 2010 15:29 PST
Page With Date HugoLong`
func TestDegenerateDateFrontMatter(t *testing.T) {
p, _ := ReadFrom(strings.NewReader(PAGE_WITH_INVALID_DATE), "page/with/invalid/date")
p, _ := NewPageFrom(strings.NewReader(PAGE_WITH_INVALID_DATE), "page/with/invalid/date")
if p.Date != *new(time.Time) {
t.Fatalf("Date should be set to time.Time zero value. Got: %s", p.Date)
}
@@ -116,7 +116,7 @@ func TestParsingDateInFrontMatter(t *testing.T) {
if e != nil {
t.Fatalf("Unable to parse date time (RFC3339) for running the test: %s", e)
}
p, err := ReadFrom(strings.NewReader(test.buf), "page/with/date")
p, err := NewPageFrom(strings.NewReader(test.buf), "page/with/date")
if err != nil {
t.Fatalf("Expected to be able to parse page.")
}