-
Notifications
You must be signed in to change notification settings - Fork 57
/
lists_test.go
29 lines (24 loc) · 976 Bytes
/
lists_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package tmdb
import (
. "gopkg.in/check.v1"
)
const oscarWinnerListID string = "509ec17b19c2950a0600050d"
func (s *TmdbSuite) TestGetListInfo(c *C) {
result, err := s.tmdb.GetListInfo(oscarWinnerListID)
s.baseTest(&result, err, c)
c.Assert(result.ID, Equals, oscarWinnerListID)
c.Assert(result.CreatedBy, Equals, "Travis Bell")
c.Assert(result.Iso639_1, Equals, "en")
c.Assert(result.ItemCount, Equals, 86)
c.Assert(result.Name, Equals, "Best Picture Winners - The Academy Awards")
}
func (s *TmdbSuite) TestGetListItemStatus(c *C) {
fightClubResult, err := s.tmdb.GetListItemStatus(oscarWinnerListID, 550)
s.baseTest(&fightClubResult, err, c)
c.Assert(fightClubResult.ID, Equals, oscarWinnerListID)
c.Assert(fightClubResult.ItemPresent, Equals, false)
argoResult, err := s.tmdb.GetListItemStatus(oscarWinnerListID, 68734)
s.baseTest(&argoResult, err, c)
c.Assert(argoResult.ID, Equals, oscarWinnerListID)
c.Assert(argoResult.ItemPresent, Equals, true)
}