forked from cyruzin/golang-tmdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration_test.go
73 lines (61 loc) · 2.02 KB
/
configuration_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
62
63
64
65
66
67
68
69
70
71
72
73
package tmdb
func (suite *TMBDTestSuite) TestGetConfigurationAPI() {
configuration, err := suite.client.GetConfigurationAPI()
suite.Nil(err)
suite.NotNil(configuration.Images.BackdropSizes)
}
func (suite *TMBDTestSuite) TestGetConfigurationAPIFail() {
suite.client.apiKey = ""
_, err := suite.client.GetConfigurationAPI()
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetConfigurationCountries() {
configuration, err := suite.client.GetConfigurationCountries()
suite.Nil(err)
suite.NotNil(configuration)
}
func (suite *TMBDTestSuite) TestGetConfigurationCountriesFail() {
suite.client.apiKey = ""
_, err := suite.client.GetConfigurationCountries()
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetConfigurationJobs() {
configuration, err := suite.client.GetConfigurationJobs()
suite.Nil(err)
suite.NotNil(configuration)
}
func (suite *TMBDTestSuite) TestGetConfigurationJobsFail() {
suite.client.apiKey = ""
_, err := suite.client.GetConfigurationJobs()
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetConfigurationLanguages() {
configuration, err := suite.client.GetConfigurationLanguages()
suite.Nil(err)
suite.NotNil(configuration)
}
func (suite *TMBDTestSuite) TestGetConfigurationLanguagesFail() {
suite.client.apiKey = ""
_, err := suite.client.GetConfigurationLanguages()
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetConfigurationPrimaryTranslations() {
configuration, err := suite.client.GetConfigurationPrimaryTranslations()
suite.Nil(err)
suite.NotNil(configuration)
}
func (suite *TMBDTestSuite) TestGetConfigurationPrimaryTranslationsFail() {
suite.client.apiKey = ""
_, err := suite.client.GetConfigurationPrimaryTranslations()
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetConfigurationTimezones() {
configuration, err := suite.client.GetConfigurationTimezones()
suite.Nil(err)
suite.NotNil(configuration)
}
func (suite *TMBDTestSuite) TestGetConfigurationTimezonesFail() {
suite.client.apiKey = ""
_, err := suite.client.GetConfigurationTimezones()
suite.NotNil(err)
}