-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathguest_sessions_test.go
64 lines (58 loc) · 1.92 KB
/
guest_sessions_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
package tmdb
func (suite *TMBDTestSuite) TestGetGuestSessionRatedMovies() {
o := make(map[string]string)
o["language"] = "en-US"
o["sort_by"] = "created_at.asc"
gs, err := suite.client.CreateGuestSession()
suite.Nil(err)
_, err = suite.client.GetGuestSessionRatedMovies(gs.GuestSessionID, o)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetGuestSessionRatedMoviesFail() {
o := make(map[string]string)
o["language"] = "en-US"
o["sort_by"] = "created_at.asc"
gs, err := suite.client.CreateGuestSession()
suite.Nil(err)
suite.client.apiKey = ""
_, err = suite.client.GetGuestSessionRatedMovies(gs.GuestSessionID, o)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetGuestSessionRatedTVShows() {
o := make(map[string]string)
o["language"] = "en-US"
o["sort_by"] = "created_at.asc"
gs, err := suite.client.CreateGuestSession()
suite.Nil(err)
_, err = suite.client.GetGuestSessionRatedTVShows(gs.GuestSessionID, o)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetGuestSessionRatedTVShowsFail() {
o := make(map[string]string)
o["language"] = "en-US"
o["sort_by"] = "created_at.asc"
gs, err := suite.client.CreateGuestSession()
suite.Nil(err)
suite.client.apiKey = ""
_, err = suite.client.GetGuestSessionRatedTVShows(gs.GuestSessionID, o)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetGuestSessionRatedTVEpisodes() {
o := make(map[string]string)
o["language"] = "en-US"
o["sort_by"] = "created_at.asc"
gs, err := suite.client.CreateGuestSession()
suite.Nil(err)
_, err = suite.client.GetGuestSessionRatedTVEpisodes(gs.GuestSessionID, o)
suite.NotNil(err)
}
func (suite *TMBDTestSuite) TestGetGuestSessionRatedTVEpisodesFail() {
o := make(map[string]string)
o["language"] = "en-US"
o["sort_by"] = "created_at.asc"
gs, err := suite.client.CreateGuestSession()
suite.Nil(err)
suite.client.apiKey = ""
_, err = suite.client.GetGuestSessionRatedTVEpisodes(gs.GuestSessionID, o)
suite.NotNil(err)
}