forked from cyruzin/golang-tmdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfind_test.go
36 lines (30 loc) · 861 Bytes
/
find_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
package tmdb
const (
theWalkingDeadID = "tt1520211"
interstellarID = "tt0816692"
alPacinoID = "nm0000199"
)
var options = map[string]string{
"external_source": "imdb_id",
"language": "en-US",
}
func (suite *TMBDTestSuite) TestGetFindMovieByID() {
results, err := suite.client.GetFindByID(interstellarID, options)
suite.Nil(err)
suite.NotNil(results)
}
func (suite *TMBDTestSuite) TestGetFindTVByID() {
results, err := suite.client.GetFindByID(theWalkingDeadID, options)
suite.Nil(err)
suite.NotNil(results)
}
func (suite *TMBDTestSuite) TestGetFindPersonByID() {
results, err := suite.client.GetFindByID(alPacinoID, options)
suite.Nil(err)
suite.NotNil(results)
}
func (suite *TMBDTestSuite) TestGetFindByIDFail() {
suite.client.apiKey = ""
_, err := suite.client.GetFindByID(theWalkingDeadID, options)
suite.NotNil(err)
}