-
Notifications
You must be signed in to change notification settings - Fork 35
/
genres_test.go
41 lines (35 loc) · 1.03 KB
/
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
34
35
36
37
38
39
40
41
package tmdb
func (suite *TMBDTestSuite) TestGetGenreMovieList() {
genres, err := suite.client.GetGenreMovieList(nil)
suite.Nil(err)
suite.NotNil(genres)
}
func (suite *TMBDTestSuite) TestGetGenreMovieListFail() {
suite.client.apiKey = ""
_, err := suite.client.GetGenreMovieList(nil)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetGenreMovieListWithOptions() {
options := make(map[string]string)
options["language"] = "pt-BR"
genres, err := suite.client.GetGenreMovieList(options)
suite.Nil(err)
suite.NotNil(genres)
}
func (suite *TMBDTestSuite) TestGetGenreTVList() {
genres, err := suite.client.GetGenreTVList(nil)
suite.Nil(err)
suite.NotNil(genres)
}
func (suite *TMBDTestSuite) TestGetGenreTVListFail() {
suite.client.apiKey = ""
_, err := suite.client.GetGenreTVList(nil)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetGenreTVListWithOptions() {
options := make(map[string]string)
options["language"] = "pt-BR"
genres, err := suite.client.GetGenreTVList(options)
suite.Nil(err)
suite.NotNil(genres)
}