forked from ryanbradynd05/go-tmdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
genres_test.go
33 lines (28 loc) · 1000 Bytes
/
genres_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
30
31
32
33
package tmdb
import (
. "gopkg.in/check.v1"
)
func (s *TmdbSuite) TestGetMovieGenres(c *C) {
movieGenres, err := s.tmdb.GetMovieGenres(nil)
s.baseTest(&movieGenres, err, c)
c.Assert(movieGenres.Genres, NotNil)
c.Assert(movieGenres.Genres, Not(HasLen), 0)
var movieOptions = make(map[string]string)
movieOptions["language"] = "es"
spanishMovieGenres, err := s.tmdb.GetMovieGenres(movieOptions)
s.baseTest(&spanishMovieGenres, err, c)
c.Assert(spanishMovieGenres.Genres, NotNil)
c.Assert(spanishMovieGenres.Genres, Not(HasLen), 0)
}
func (s *TmdbSuite) TestGetTvGenres(c *C) {
tvGenres, err := s.tmdb.GetTvGenres(nil)
s.baseTest(&tvGenres, err, c)
c.Assert(tvGenres.Genres, NotNil)
c.Assert(tvGenres.Genres, Not(HasLen), 0)
var tvOptions = make(map[string]string)
tvOptions["language"] = "es"
spanishTvGenres, err := s.tmdb.GetTvGenres(tvOptions)
s.baseTest(&spanishTvGenres, err, c)
c.Assert(spanishTvGenres.Genres, NotNil)
c.Assert(spanishTvGenres.Genres, Not(HasLen), 0)
}