ponyapi/client/go/get_test.go

67 lines
911 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)
}
2015-08-17 21:36:24 +00:00
func TestLastAiredEpisode(t *testing.T) {
ep, err := LastAired()
if err != nil {
t.Fatal(err)
}
t.Logf("%#v", ep)
}
2015-08-13 01:07:20 +00:00
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)
}