1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Use image included in feed as feed icon

This commit is contained in:
Ryan Stafford 2023-06-04 18:01:59 -04:00 committed by GitHub
parent 228bb62df4
commit 1aeb1b20da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 92 additions and 28 deletions

View file

@ -18,6 +18,11 @@ func TestParseRss2Sample(t *testing.T) {
<title>Liftoff News</title>
<link>http://liftoff.msfc.nasa.gov/</link>
<description>Liftoff to Space Exploration.</description>
<image>
<url>http://liftoff.msfc.nasa.gov/HomePageXtra/MeatBall.gif</url>
<title>NASA</title>
<link>http://liftoff.msfc.nasa.gov/</link>
</image>
<language>en-us</language>
<pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate>
<lastBuildDate>Tue, 10 Jun 2003 09:41:01 GMT</lastBuildDate>
@ -71,6 +76,10 @@ func TestParseRss2Sample(t *testing.T) {
t.Errorf("Incorrect site URL, got: %s", feed.SiteURL)
}
if feed.IconURL != "http://liftoff.msfc.nasa.gov/HomePageXtra/MeatBall.gif" {
t.Errorf("Incorrect image URL, got: %s", feed.IconURL)
}
if len(feed.Entries) != 4 {
t.Errorf("Incorrect number of entries, got: %d", len(feed.Entries))
}