Example #1
0
func TestRFC1132(t *testing.T) {
	// if testing.Short() {
	// 	t.Skip("Skipping test in short mode.")
	// }
	xmlFeed := readXML("../feeds/example-rfc1132.xml")
	feed, err := poo.ParseXML(xmlFeed)
	if len(feed.Channel.Items) < 3 {
		t.Fail()
	}
	if err != nil {
		t.Error(err)
	}
}
Example #2
0
File: poo_test.go Project: gr4y/poo
func TestWithString(t *testing.T) {
	if testing.Short() {
		t.Skip("Skipping test in short mode.")
	}
	xmlFeed := readXML("feeds/example-itunes_feed.xml")
	feed, err := poo.ParseXML(xmlFeed)
	if err != nil {
		t.Error(err)
	}
	if feed.Channel.Title != "All About Everything" {
		t.Log(fmt.Sprintf("%s doesn't match", feed.Channel.Title))
		t.Fail()
	}
}