-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathproviders_test.go
45 lines (38 loc) · 1.32 KB
/
providers_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
package tmdb
func (suite *TMBDTestSuite) TestGetAvailableWatchProviderRegions() {
watchProviderRegions, err := suite.client.GetAvailableWatchProviderRegions(nil)
suite.Nil(err)
suite.NotNil(watchProviderRegions)
}
func (suite *TMBDTestSuite) TestGetAvailableWatchProviderRegionsFail() {
suite.client.apiKey = ""
_, err := suite.client.GetAvailableWatchProviderRegions(nil)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetAvailableWatchProviderRegionsWithOptions() {
options := make(map[string]string)
options["language"] = "de-DE"
watchProviderRegions, err := suite.client.GetAvailableWatchProviderRegions(options)
suite.Nil(err)
suite.NotNil(watchProviderRegions)
}
func (suite *TMBDTestSuite) TestGetWatchProvidersMovie() {
watchProviders, err := suite.client.GetWatchProvidersMovie(nil)
suite.Nil(err)
suite.NotNil(watchProviders)
}
func (suite *TMBDTestSuite) TestGetWatchProvidersMovieFail() {
suite.client.apiKey = ""
_, err := suite.client.GetWatchProvidersMovie(nil)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetWatchProvidersTv() {
watchProviders, err := suite.client.GetWatchProvidersTv(nil)
suite.Nil(err)
suite.NotNil(watchProviders)
}
func (suite *TMBDTestSuite) TestGetWatchProvidersTvFail() {
suite.client.apiKey = ""
_, err := suite.client.GetWatchProvidersTv(nil)
suite.NotNil(err)
}