mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
feat: populate feed description automatically
This commit is contained in:
parent
5920e02562
commit
8142268799
9 changed files with 83 additions and 11 deletions
|
@ -67,6 +67,10 @@ func TestParseRss2Sample(t *testing.T) {
|
|||
t.Errorf("Incorrect title, got: %s", feed.Title)
|
||||
}
|
||||
|
||||
if feed.Description != "Liftoff to Space Exploration." {
|
||||
t.Errorf("Incorrect description, got: %s", feed.Description)
|
||||
}
|
||||
|
||||
if feed.FeedURL != "http://liftoff.msfc.nasa.gov/rss.xml" {
|
||||
t.Errorf("Incorrect feed URL, got: %s", feed.FeedURL)
|
||||
}
|
||||
|
@ -237,6 +241,14 @@ func TestParseEntryWithoutTitleAndDescription(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if feed.Description != "" {
|
||||
t.Errorf("Expected empty feed description, got: %s", feed.Description)
|
||||
}
|
||||
|
||||
if len(feed.Entries) != 1 {
|
||||
t.Errorf("Expected 1 entry, got: %d", len(feed.Entries))
|
||||
}
|
||||
|
||||
if feed.Entries[0].Title != "https://example.org/item" {
|
||||
t.Errorf("Incorrect entry title, got: %s", feed.Entries[0].Title)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue