-
Notifications
You must be signed in to change notification settings - Fork 35
/
companies_test.go
42 lines (35 loc) · 1.02 KB
/
companies_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
package tmdb
const (
lucasFilmID = 1
randomID = 3
)
func (suite *TMBDTestSuite) TestGetCompanyDetails() {
company, err := suite.client.GetCompanyDetails(lucasFilmID)
suite.Nil(err)
suite.NotNil(company.ID)
}
func (suite *TMBDTestSuite) TestGetCompanyDetailsFail() {
suite.client.apiKey = ""
_, err := suite.client.GetCompanyDetails(lucasFilmID)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetCompanyAlternativeNames() {
company, err := suite.client.GetCompanyAlternativeNames(lucasFilmID)
suite.Nil(err)
suite.NotNil(company.ID)
}
func (suite *TMBDTestSuite) TestGetCompanyAlternativeNamesFail() {
suite.client.apiKey = ""
_, err := suite.client.GetCompanyAlternativeNames(lucasFilmID)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetCompanyImages() {
company, err := suite.client.GetCompanyImages(randomID)
suite.Nil(err)
suite.NotNil(company.ID)
}
func (suite *TMBDTestSuite) TestGetCompanyImagesFail() {
suite.client.apiKey = ""
_, err := suite.client.GetCompanyImages(randomID)
suite.NotNil(err)
}