-
Notifications
You must be signed in to change notification settings - Fork 35
/
keywords_test.go
35 lines (29 loc) · 923 Bytes
/
keywords_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
package tmdb
const wormWholeID = 3417
func (suite *TMBDTestSuite) TestGetKeywordDetails() {
keyword, err := suite.client.GetKeywordDetails(wormWholeID)
suite.Nil(err)
suite.NotNil(keyword)
}
func (suite *TMBDTestSuite) TestGetKeywordDetailsFail() {
suite.client.apiKey = ""
_, err := suite.client.GetKeywordDetails(wormWholeID)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetKeywordMovies() {
keyword, err := suite.client.GetKeywordMovies(wormWholeID, nil)
suite.Nil(err)
suite.NotNil(keyword)
}
func (suite *TMBDTestSuite) TestGetKeywordMoviesFail() {
suite.client.apiKey = ""
_, err := suite.client.GetKeywordMovies(wormWholeID, nil)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetKeywordMoviesWithOptions() {
options := make(map[string]string)
options["language"] = "pt-BR"
keyword, err := suite.client.GetKeywordMovies(wormWholeID, options)
suite.Nil(err)
suite.NotNil(keyword)
}