From bfbe2dd3be47b65dec62e31c166e0fb578c76cfe Mon Sep 17 00:00:00 2001 From: Harm Aarts Date: Thu, 5 Dec 2013 14:22:03 +0100 Subject: [PATCH] Fixes the tests Reference the item directly through channel as the notification functionality has been removed. --- feed_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/feed_test.go b/feed_test.go index fad7b7f..60bad51 100644 --- a/feed_test.go +++ b/feed_test.go @@ -37,7 +37,7 @@ func Test_AtomAuthor(t *testing.T) { feed := New(1, true, chanHandler, itemHandler) err = feed.FetchBytes("http://example.com", content, nil) - item := items[0] + item := feed.Channels[0].Items[0] expected := "Cody Lee" if item.Author.Name != expected { t.Errorf("Expected author to be %s but found %s", expected, item.Author.Name) @@ -49,7 +49,7 @@ func Test_RssAuthor(t *testing.T) { feed := New(1, true, chanHandler, itemHandler) feed.FetchBytes("http://example.com", content, nil) - item := items[0] + item := feed.Channels[0].Items[0] expected := "Cory Doctorow" if item.Author.Name != expected { t.Errorf("Expected author to be %s but found %s", expected, item.Author.Name) @@ -61,7 +61,7 @@ func Test_CData(t *testing.T) { feed := New(1, true, chanHandler, itemHandler) feed.FetchBytes("http://example.com", content, nil) - item := items[0] + item := feed.Channels[0].Items[0] expected := `

abc

"def"
ghi` if item.Description != expected { t.Errorf("Expected item.Description to be [%s] but item.Description=[%s]", expected, item.Description)