forked from cyruzin/golang-tmdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchanges_test.go
61 lines (52 loc) · 1.53 KB
/
changes_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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package tmdb
func (suite *TMBDTestSuite) TestGetChangesMovie() {
changes, err := suite.client.GetChangesMovie(nil)
suite.Nil(err)
suite.NotNil(changes.Page)
}
func (suite *TMBDTestSuite) TestGetChangesMovieFail() {
suite.client.apiKey = ""
_, err := suite.client.GetChangesMovie(nil)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetChangesMovieWithOptions() {
options := make(map[string]string)
options["page"] = "1"
changes, err := suite.client.GetChangesMovie(options)
suite.Nil(err)
suite.NotNil(changes.Page)
}
func (suite *TMBDTestSuite) TestGetChangesTV() {
changes, err := suite.client.GetChangesTV(nil)
suite.Nil(err)
suite.NotNil(changes.Page)
}
func (suite *TMBDTestSuite) TestGetChangesTVFail() {
suite.client.apiKey = ""
_, err := suite.client.GetChangesTV(nil)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetChangesTVWithOptions() {
options := make(map[string]string)
options["page"] = "1"
changes, err := suite.client.GetChangesTV(options)
suite.Nil(err)
suite.NotNil(changes.Page)
}
func (suite *TMBDTestSuite) TestGetChangesPerson() {
changes, err := suite.client.GetChangesPerson(nil)
suite.Nil(err)
suite.NotNil(changes.Page)
}
func (suite *TMBDTestSuite) TestGetChangesPersonFail() {
suite.client.apiKey = ""
_, err := suite.client.GetChangesPerson(nil)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetChangesPersonWithOptions() {
options := make(map[string]string)
options["page"] = "1"
changes, err := suite.client.GetChangesPerson(options)
suite.Nil(err)
suite.NotNil(changes.Page)
}