1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-17 17:08:36 +00:00

Add <head> tag to OPML export

This commit is contained in:
Frédéric Guillot 2021-12-16 11:42:43 -08:00
parent 47b47cc32c
commit 0f6f4c8c60
4 changed files with 79 additions and 66 deletions

View file

@ -6,7 +6,6 @@ package opml // import "miniflux.app/reader/opml"
import (
"bytes"
"fmt"
"testing"
)
@ -17,7 +16,6 @@ func TestSerialize(t *testing.T) {
subscriptions = append(subscriptions, &Subcription{Title: "Feed 3", FeedURL: "http://example.org/feed/3", SiteURL: "http://example.org/3", CategoryName: "Category 2"})
output := Serialize(subscriptions)
fmt.Println(output)
feeds, err := Parse(bytes.NewBufferString(output))
if err != nil {
t.Error(err)
@ -56,7 +54,7 @@ func TestNormalizedCategoriesOrder(t *testing.T) {
subscriptions = append(subscriptions, &Subcription{Title: "Feed 2", FeedURL: "http://example.org/feed/2", SiteURL: "http://example.org/2", CategoryName: orderTests[1].naturalOrderName})
subscriptions = append(subscriptions, &Subcription{Title: "Feed 3", FeedURL: "http://example.org/feed/3", SiteURL: "http://example.org/3", CategoryName: orderTests[2].naturalOrderName})
feeds := normalizeFeeds(subscriptions)
feeds := convertSubscriptionsToOPML(subscriptions)
for i, o := range orderTests {
if feeds.Outlines[i].Text != o.correctOrderName {