diff options
Diffstat (limited to 'internal/reader/subscription/finder_test.go')
-rw-r--r-- | internal/reader/subscription/finder_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/internal/reader/subscription/finder_test.go b/internal/reader/subscription/finder_test.go index 71f49281..160b52cb 100644 --- a/internal/reader/subscription/finder_test.go +++ b/internal/reader/subscription/finder_test.go @@ -40,7 +40,7 @@ func TestParseWebPageWithRssFeed(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -73,7 +73,7 @@ func TestParseWebPageWithAtomFeed(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -106,7 +106,7 @@ func TestParseWebPageWithJSONFeed(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -139,7 +139,7 @@ func TestParseWebPageWithOldJSONFeedMimeType(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -172,7 +172,7 @@ func TestParseWebPageWithRelativeFeedURL(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -205,7 +205,7 @@ func TestParseWebPageWithEmptyTitle(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -239,7 +239,7 @@ func TestParseWebPageWithMultipleFeeds(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -261,7 +261,7 @@ func TestParseWebPageWithDuplicatedFeeds(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -294,7 +294,7 @@ func TestParseWebPageWithEmptyFeedURL(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } @@ -315,7 +315,7 @@ func TestParseWebPageWithNoHref(t *testing.T) { </body> </html>` - subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", strings.NewReader(htmlPage)) + subscriptions, err := NewSubscriptionFinder(nil).FindSubscriptionsFromWebPage("http://example.org/", "text/html", strings.NewReader(htmlPage)) if err != nil { t.Fatalf(`Parsing a correctly formatted HTML page should not return any error: %v`, err) } |