Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Nov 12, 2023
1 parent f50d00c commit 0a9f114
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (b *broker) FetchRemoteEntries(published, drafts bool) ([]*entry, error) {
}
return nil, err
}
if b.rootURL != "" {
if b.rootURL == "" {
if l := feed.Links.Find("alternate"); l != nil {
b.rootURL = l.Href
}
Expand Down
4 changes: 4 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ func TestBlogsync(t *testing.T) {
t.Fatalf("unexpected draft file: %s", entryFile)
}

if _, err := blogsync("pull"); err != nil {
t.Error(err)
}

t.Log("Check entry metadata")
e, err := entryFromFile(entryFile)
if err != nil {
Expand Down

0 comments on commit 0a9f114

Please sign in to comment.