Skip to content

Commit

Permalink
Merge pull request #141 from x-motemen/testing
Browse files Browse the repository at this point in the history
[nit] enhance testing
  • Loading branch information
Songmu committed Nov 11, 2023
2 parents e5945cd + 257dadf commit 39a0f6e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ func TestBlogsync(t *testing.T) {
}
originalEntryFile := entryFile
entryFile = movedPath
e, err := entryFromFile(entryFile)
if err != nil {
t.Fatal(err)
}
if e.URL != nil {
t.Errorf("URL is registered in a draft with no custom path specified. URL: %s", *e.URL)
}
if e.Date != nil {
t.Errorf("Date is registered in a draft. Date: %s", *e.Date)
}

if err := appendFile(movedPath, "updated\n"); err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 39a0f6e

Please sign in to comment.