ponyapi/client/go/get_test.go

58 lines
787 B
Go
Raw Normal View History

2015-08-13 01:07:20 +00:00
package ponyapi
import "testing"
func TestNewestEpisode(t *testing.T) {
ep, err := Newest()
if err != nil {
t.Fatal(err)
}
t.Logf("%#v", ep)
}
func TestRandomEpisode(t *testing.T) {
ep, err := Random()
if err != nil {
t.Fatal(err)
}
t.Logf("%#v", ep)
}
func TestSpecificEpisode(t *testing.T) {
ep, err := GetEpisode(2, 24)
if err != nil {
t.Fatal(err)
}
t.Logf("%#v", ep)
}
func TestAllEpisodes(t *testing.T) {
eps, err := AllEpisodes()
if err != nil {
t.Fatal(err)
}
t.Logf("%d episodes", len(eps))
}
func TestGetSeason(t *testing.T) {
eps, err := GetSeason(4)
if err != nil {
t.Fatal(err)
}
t.Logf("%d episodes", len(eps))
}
func TestSearch(t *testing.T) {
eps, err := Search("pony")
if err != nil {
t.Fatal(err)
}
t.Logf("%#v", eps)
}