trakt_api 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +19 -0
  3. data/.travis.yml +4 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +252 -0
  7. data/Rakefile +1 -0
  8. data/lib/generators/templates/trakt_api.rb +5 -0
  9. data/lib/generators/trakt_api/install_generator.rb +12 -0
  10. data/lib/trakt_api.rb +22 -0
  11. data/lib/trakt_api/account.rb +16 -0
  12. data/lib/trakt_api/activity.rb +109 -0
  13. data/lib/trakt_api/base.rb +93 -0
  14. data/lib/trakt_api/calendar.rb +17 -0
  15. data/lib/trakt_api/client.rb +74 -0
  16. data/lib/trakt_api/comment.rb +16 -0
  17. data/lib/trakt_api/configuration.rb +7 -0
  18. data/lib/trakt_api/genres.rb +11 -0
  19. data/lib/trakt_api/lists.rb +26 -0
  20. data/lib/trakt_api/movie.rb +86 -0
  21. data/lib/trakt_api/movies.rb +11 -0
  22. data/lib/trakt_api/network.rb +26 -0
  23. data/lib/trakt_api/rate.rb +31 -0
  24. data/lib/trakt_api/recommendations.rb +21 -0
  25. data/lib/trakt_api/search.rb +26 -0
  26. data/lib/trakt_api/server.rb +6 -0
  27. data/lib/trakt_api/show.rb +152 -0
  28. data/lib/trakt_api/shows.rb +11 -0
  29. data/lib/trakt_api/user.rb +124 -0
  30. data/lib/trakt_api/version.rb +3 -0
  31. data/spec/integration_spec_helper.rb +3 -0
  32. data/spec/integrations/account_spec.rb +19 -0
  33. data/spec/integrations/calendar_spec.rb +31 -0
  34. data/spec/integrations/client_spec.rb +173 -0
  35. data/spec/integrations/genres_spec.rb +19 -0
  36. data/spec/integrations/movies_spec.rb +25 -0
  37. data/spec/integrations/network_spec.rb +37 -0
  38. data/spec/integrations/search_spec.rb +37 -0
  39. data/spec/integrations/server_spec.rb +13 -0
  40. data/spec/integrations/shows_spec.rb +25 -0
  41. data/spec/integrations/support/trakt_api.rb.example +5 -0
  42. data/spec/spec_helper.rb +43 -0
  43. data/spec/trakt_api/account_spec.rb +56 -0
  44. data/spec/trakt_api/activity_spec.rb +297 -0
  45. data/spec/trakt_api/base_spec.rb +147 -0
  46. data/spec/trakt_api/calendar_spec.rb +48 -0
  47. data/spec/trakt_api/client_spec.rb +101 -0
  48. data/spec/trakt_api/comment_spec.rb +69 -0
  49. data/spec/trakt_api/genres_spec.rb +24 -0
  50. data/spec/trakt_api/lists_spec.rb +111 -0
  51. data/spec/trakt_api/movie_spec.rb +333 -0
  52. data/spec/trakt_api/movies_spec.rb +38 -0
  53. data/spec/trakt_api/network_spec.rb +105 -0
  54. data/spec/trakt_api/rate_spec.rb +132 -0
  55. data/spec/trakt_api/recommendations_spec.rb +90 -0
  56. data/spec/trakt_api/search_spec.rb +81 -0
  57. data/spec/trakt_api/server_spec.rb +15 -0
  58. data/spec/trakt_api/show_spec.rb +588 -0
  59. data/spec/trakt_api/shows_spec.rb +38 -0
  60. data/spec/trakt_api/user_spec.rb +561 -0
  61. data/trakt_api.gemspec +29 -0
  62. metadata +232 -0
@@ -0,0 +1,132 @@
1
+ require 'spec_helper'
2
+
3
+ describe TraktApi::Rate do
4
+ let(:model) { TraktApi::Rate.new(TraktApi::Client.new) }
5
+ let(:mock_model) { SampleModel.new }
6
+
7
+ describe '.episode' do
8
+ it 'should call auth' do
9
+ model.should_receive(:auth).and_return(mock_model)
10
+
11
+ model.episode(sample: true)
12
+ end
13
+
14
+ it 'should call post with specific params' do
15
+ model.instance_variable_set("@method", :post)
16
+ model.should_receive(:post).with('rate/episode').and_return(mock_model)
17
+
18
+ model.episode(sample: true)
19
+ end
20
+
21
+ it 'should call params' do
22
+ model.should_receive(:params).and_return(mock_model)
23
+
24
+ model.episode(sample: true)
25
+ end
26
+ end
27
+
28
+ describe '.episodes' do
29
+ it 'should call auth' do
30
+ model.should_receive(:auth).and_return(mock_model)
31
+
32
+ model.episodes(sample: true)
33
+ end
34
+
35
+ it 'should call post with specific params' do
36
+ model.instance_variable_set("@method", :post)
37
+ model.should_receive(:post).with('rate/episodes').and_return(mock_model)
38
+
39
+ model.episodes(sample: true)
40
+ end
41
+
42
+ it 'should call params' do
43
+ model.should_receive(:params).and_return(mock_model)
44
+
45
+ model.episodes(sample: true)
46
+ end
47
+ end
48
+
49
+ describe '.movie' do
50
+ it 'should call auth' do
51
+ model.should_receive(:auth).and_return(mock_model)
52
+
53
+ model.movie(sample: true)
54
+ end
55
+
56
+ it 'should call post with specific params' do
57
+ model.instance_variable_set("@method", :post)
58
+ model.should_receive(:post).with('rate/movie').and_return(mock_model)
59
+
60
+ model.movie(sample: true)
61
+ end
62
+
63
+ it 'should call params' do
64
+ model.should_receive(:params).and_return(mock_model)
65
+
66
+ model.movie(sample: true)
67
+ end
68
+ end
69
+
70
+ describe '.movies' do
71
+ it 'should call auth' do
72
+ model.should_receive(:auth).and_return(mock_model)
73
+
74
+ model.movies(sample: true)
75
+ end
76
+
77
+ it 'should call post with specific params' do
78
+ model.instance_variable_set("@method", :post)
79
+ model.should_receive(:post).with('rate/movies').and_return(mock_model)
80
+
81
+ model.movies(sample: true)
82
+ end
83
+
84
+ it 'should call params' do
85
+ model.should_receive(:params).and_return(mock_model)
86
+
87
+ model.movies(sample: true)
88
+ end
89
+ end
90
+
91
+ describe '.show' do
92
+ it 'should call auth' do
93
+ model.should_receive(:auth).and_return(mock_model)
94
+
95
+ model.show(sample: true)
96
+ end
97
+
98
+ it 'should call post with specific params' do
99
+ model.instance_variable_set("@method", :post)
100
+ model.should_receive(:post).with('rate/show').and_return(mock_model)
101
+
102
+ model.show(sample: true)
103
+ end
104
+
105
+ it 'should call params' do
106
+ model.should_receive(:params).and_return(mock_model)
107
+
108
+ model.show(sample: true)
109
+ end
110
+ end
111
+
112
+ describe '.shows' do
113
+ it 'should call auth' do
114
+ model.should_receive(:auth).and_return(mock_model)
115
+
116
+ model.shows(sample: true)
117
+ end
118
+
119
+ it 'should call post with specific params' do
120
+ model.instance_variable_set("@method", :post)
121
+ model.should_receive(:post).with('rate/shows').and_return(mock_model)
122
+
123
+ model.shows(sample: true)
124
+ end
125
+
126
+ it 'should call params' do
127
+ model.should_receive(:params).and_return(mock_model)
128
+
129
+ model.shows(sample: true)
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,90 @@
1
+ require 'spec_helper'
2
+
3
+ describe TraktApi::Recommendations do
4
+ let(:model) { TraktApi::Recommendations.new(TraktApi::Client.new) }
5
+ let(:mock_model) { SampleModel.new }
6
+
7
+ describe '.movies' do
8
+ it 'should call auth' do
9
+ model.should_receive(:auth).and_return(mock_model)
10
+
11
+ model.movies(sample: true)
12
+ end
13
+
14
+ it 'should call post with specific params' do
15
+ model.instance_variable_set("@method", :post)
16
+ model.should_receive(:post).with('recommendations/movies').and_return(mock_model)
17
+
18
+ model.movies(sample: true)
19
+ end
20
+
21
+ it 'should call params' do
22
+ model.should_receive(:params).and_return(mock_model)
23
+
24
+ model.movies(sample: true)
25
+ end
26
+ end
27
+
28
+ describe '.movies_dismiss' do
29
+ it 'should call auth' do
30
+ model.should_receive(:auth).and_return(mock_model)
31
+
32
+ model.movies_dismiss(sample: true)
33
+ end
34
+
35
+ it 'should call post with specific params' do
36
+ model.instance_variable_set("@method", :post)
37
+ model.should_receive(:post).with('recommendations/movies/dismiss').and_return(mock_model)
38
+
39
+ model.movies_dismiss(sample: true)
40
+ end
41
+
42
+ it 'should call params' do
43
+ model.should_receive(:params).and_return(mock_model)
44
+
45
+ model.movies_dismiss(sample: true)
46
+ end
47
+ end
48
+
49
+ describe '.shows' do
50
+ it 'should call auth' do
51
+ model.should_receive(:auth).and_return(mock_model)
52
+
53
+ model.shows(sample: true)
54
+ end
55
+
56
+ it 'should call post with specific params' do
57
+ model.instance_variable_set("@method", :post)
58
+ model.should_receive(:post).with('recommendations/shows').and_return(mock_model)
59
+
60
+ model.shows(sample: true)
61
+ end
62
+
63
+ it 'should call params' do
64
+ model.should_receive(:params).and_return(mock_model)
65
+
66
+ model.shows(sample: true)
67
+ end
68
+ end
69
+
70
+ describe '.shows_dismiss' do
71
+ it 'should call auth' do
72
+ model.should_receive(:auth).and_return(mock_model)
73
+
74
+ model.shows_dismiss(sample: true)
75
+ end
76
+
77
+ it 'should call post with specific params' do
78
+ model.instance_variable_set("@method", :post)
79
+ model.should_receive(:post).with('recommendations/shows/dismiss').and_return(mock_model)
80
+
81
+ model.shows_dismiss(sample: true)
82
+ end
83
+
84
+ it 'should call params' do
85
+ model.should_receive(:params).and_return(mock_model)
86
+
87
+ model.shows_dismiss(sample: true)
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,81 @@
1
+ require 'spec_helper'
2
+
3
+ describe TraktApi::Search do
4
+ let(:model) { TraktApi::Search.new(TraktApi::Client.new) }
5
+ let(:mock_model) { SampleModel.new }
6
+
7
+ describe '.episodes' do
8
+ it 'should call get with specific params' do
9
+ model.instance_variable_set("@method", :get)
10
+ model.should_receive(:get).with('search/episodes').and_return(mock_model)
11
+
12
+ model.episodes(query: 'test')
13
+ end
14
+
15
+ it 'should call restful_params' do
16
+ model.should_receive(:params).and_return(mock_model)
17
+
18
+ model.episodes(query: 'test')
19
+ end
20
+ end
21
+
22
+ describe '.movies' do
23
+ it 'should call get with specific params' do
24
+ model.instance_variable_set("@method", :get)
25
+ model.should_receive(:get).with('search/movies').and_return(mock_model)
26
+
27
+ model.movies(query: 'test')
28
+ end
29
+
30
+ it 'should call restful_params' do
31
+ model.should_receive(:params).and_return(mock_model)
32
+
33
+ model.movies(query: 'test')
34
+ end
35
+ end
36
+
37
+ describe '.people' do
38
+ it 'should call get with specific params' do
39
+ model.instance_variable_set("@method", :get)
40
+ model.should_receive(:get).with('search/people').and_return(mock_model)
41
+
42
+ model.people(query: 'test')
43
+ end
44
+
45
+ it 'should call restful_params' do
46
+ model.should_receive(:params).and_return(mock_model)
47
+
48
+ model.people(query: 'test')
49
+ end
50
+ end
51
+
52
+ describe '.shows' do
53
+ it 'should call get with specific params' do
54
+ model.instance_variable_set("@method", :get)
55
+ model.should_receive(:get).with('search/shows').and_return(mock_model)
56
+
57
+ model.shows(query: 'test')
58
+ end
59
+
60
+ it 'should call restful_params' do
61
+ model.should_receive(:params).and_return(mock_model)
62
+
63
+ model.shows(query: 'test')
64
+ end
65
+ end
66
+
67
+ describe '.users' do
68
+ it 'should call get with specific params' do
69
+ model.instance_variable_set("@method", :get)
70
+ model.should_receive(:get).with('search/users').and_return(mock_model)
71
+
72
+ model.users(query: 'test')
73
+ end
74
+
75
+ it 'should call restful_params' do
76
+ model.should_receive(:params).and_return(mock_model)
77
+
78
+ model.users(query: 'test')
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe TraktApi::Server do
4
+ let(:model) { TraktApi::Server.new(TraktApi::Client.new) }
5
+ let(:mock_model) { SampleModel.new }
6
+
7
+ describe '.time' do
8
+ it 'should call get with specific params' do
9
+ model.instance_variable_set("@method", :get)
10
+ model.should_receive(:get).with('server/time').and_return(mock_model)
11
+
12
+ model.time
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,588 @@
1
+ require 'spec_helper'
2
+
3
+ describe TraktApi::Show do
4
+ let(:model) { TraktApi::Show.new(TraktApi::Client.new) }
5
+ let(:mock_model) { SampleModel.new }
6
+
7
+ describe '.cancel_checkin' do
8
+ it 'should call auth' do
9
+ model.should_receive(:auth).and_return(mock_model)
10
+
11
+ model.cancel_checkin
12
+ end
13
+
14
+ it 'should call post with specific params' do
15
+ model.instance_variable_set("@method", :post)
16
+ model.should_receive(:post).with('show/cancelcheckin').and_return(mock_model)
17
+
18
+ model.cancel_checkin
19
+ end
20
+ end
21
+
22
+ describe '.cancel_watching' do
23
+ it 'should call auth' do
24
+ model.should_receive(:auth).and_return(mock_model)
25
+
26
+ model.cancel_watching
27
+ end
28
+
29
+ it 'should call post with specific params' do
30
+ model.instance_variable_set("@method", :post)
31
+ model.should_receive(:post).with('show/cancelwatching').and_return(mock_model)
32
+
33
+ model.cancel_watching
34
+ end
35
+ end
36
+
37
+ describe '.check_in' do
38
+ it 'should call auth' do
39
+ model.should_receive(:auth).and_return(mock_model)
40
+
41
+ model.check_in
42
+ end
43
+
44
+ it 'should call post with specific params' do
45
+ model.instance_variable_set("@method", :post)
46
+ model.should_receive(:post).with('show/checkin').and_return(mock_model)
47
+
48
+ model.check_in
49
+ end
50
+
51
+ it 'should call params' do
52
+ model.should_receive(:params).and_return(mock_model)
53
+
54
+ model.check_in
55
+ end
56
+ end
57
+
58
+ describe '.comments' do
59
+ it 'should call get with specific params' do
60
+ model.instance_variable_set("@method", :get)
61
+ model.should_receive(:get).with('show/comments').and_return(mock_model)
62
+
63
+ model.comments
64
+ end
65
+
66
+ it 'should call restful_params' do
67
+ model.should_receive(:restful_params).and_return(mock_model)
68
+
69
+ model.comments
70
+ end
71
+ end
72
+
73
+ describe '.episode_comments' do
74
+ it 'should call get with specific params' do
75
+ model.instance_variable_set("@method", :get)
76
+ model.should_receive(:get).with('show/episode/comments').and_return(mock_model)
77
+
78
+ model.episode_comments
79
+ end
80
+
81
+ it 'should call restful_params' do
82
+ model.should_receive(:restful_params).and_return(mock_model)
83
+
84
+ model.episode_comments
85
+ end
86
+ end
87
+
88
+ describe '.episode_library' do
89
+ it 'should call auth' do
90
+ model.should_receive(:auth).and_return(mock_model)
91
+
92
+ model.episode_library
93
+ end
94
+
95
+ it 'should call post with specific params' do
96
+ model.instance_variable_set("@method", :post)
97
+ model.should_receive(:post).with('show/episode/library').and_return(mock_model)
98
+
99
+ model.episode_library
100
+ end
101
+
102
+ it 'should call params' do
103
+ model.should_receive(:params).and_return(mock_model)
104
+
105
+ model.episode_library
106
+ end
107
+ end
108
+
109
+ describe '.episode_seen' do
110
+ it 'should call auth' do
111
+ model.should_receive(:auth).and_return(mock_model)
112
+
113
+ model.episode_seen
114
+ end
115
+
116
+ it 'should call post with specific params' do
117
+ model.instance_variable_set("@method", :post)
118
+ model.should_receive(:post).with('show/episode/seen').and_return(mock_model)
119
+
120
+ model.episode_seen
121
+ end
122
+
123
+ it 'should call params' do
124
+ model.should_receive(:params).and_return(mock_model)
125
+
126
+ model.episode_seen
127
+ end
128
+ end
129
+
130
+ describe '.episode_stats' do
131
+ it 'should call get with specific params' do
132
+ model.instance_variable_set("@method", :get)
133
+ model.should_receive(:get).with('show/episode/stats').and_return(mock_model)
134
+
135
+ model.episode_stats
136
+ end
137
+
138
+ it 'should call restful_params' do
139
+ model.should_receive(:restful_params).and_return(mock_model)
140
+
141
+ model.episode_stats
142
+ end
143
+ end
144
+
145
+ describe '.episode_summary' do
146
+ it 'should call optional_auth' do
147
+ model.should_receive(:optional_auth).and_return(mock_model)
148
+
149
+ model.episode_summary
150
+ end
151
+
152
+ it 'should call get with specific params' do
153
+ model.instance_variable_set("@method", :get)
154
+ model.should_receive(:get).with('show/episode/summary').and_return(mock_model)
155
+
156
+ model.episode_summary
157
+ end
158
+
159
+ it 'should call restful_params' do
160
+ model.should_receive(:restful_params).and_return(mock_model)
161
+
162
+ model.episode_summary
163
+ end
164
+ end
165
+
166
+ describe '.episode_unlibrary' do
167
+ it 'should call auth' do
168
+ model.should_receive(:auth).and_return(mock_model)
169
+
170
+ model.episode_unlibrary
171
+ end
172
+
173
+ it 'should call post with specific params' do
174
+ model.instance_variable_set("@method", :post)
175
+ model.should_receive(:post).with('show/episode/unlibrary').and_return(mock_model)
176
+
177
+ model.episode_unlibrary
178
+ end
179
+
180
+ it 'should call params' do
181
+ model.should_receive(:params).and_return(mock_model)
182
+
183
+ model.episode_unlibrary
184
+ end
185
+ end
186
+
187
+ describe '.episode_unseen' do
188
+ it 'should call auth' do
189
+ model.should_receive(:auth).and_return(mock_model)
190
+
191
+ model.episode_unseen
192
+ end
193
+
194
+ it 'should call post with specific params' do
195
+ model.instance_variable_set("@method", :post)
196
+ model.should_receive(:post).with('show/episode/unseen').and_return(mock_model)
197
+
198
+ model.episode_unseen
199
+ end
200
+
201
+ it 'should call params' do
202
+ model.should_receive(:params).and_return(mock_model)
203
+
204
+ model.episode_unseen
205
+ end
206
+ end
207
+
208
+ describe '.episode_unwatch_list' do
209
+ it 'should call auth' do
210
+ model.should_receive(:auth).and_return(mock_model)
211
+
212
+ model.episode_unwatch_list
213
+ end
214
+
215
+ it 'should call post with specific params' do
216
+ model.instance_variable_set("@method", :post)
217
+ model.should_receive(:post).with('show/episode/unwatchlist').and_return(mock_model)
218
+
219
+ model.episode_unwatch_list
220
+ end
221
+
222
+ it 'should call params' do
223
+ model.should_receive(:params).and_return(mock_model)
224
+
225
+ model.episode_unwatch_list
226
+ end
227
+ end
228
+
229
+ describe '.episode_watching_now' do
230
+ it 'should call optional_auth' do
231
+ model.should_receive(:optional_auth).and_return(mock_model)
232
+
233
+ model.episode_watching_now
234
+ end
235
+
236
+ it 'should call get with specific params' do
237
+ model.instance_variable_set("@method", :get)
238
+ model.should_receive(:get).with('show/episode/watchingnow').and_return(mock_model)
239
+
240
+ model.episode_watching_now
241
+ end
242
+
243
+ it 'should call restful_params' do
244
+ model.should_receive(:restful_params).and_return(mock_model)
245
+
246
+ model.episode_watching_now
247
+ end
248
+ end
249
+
250
+ describe '.episode_watch_list' do
251
+ it 'should call auth' do
252
+ model.should_receive(:auth).and_return(mock_model)
253
+
254
+ model.episode_watch_list
255
+ end
256
+
257
+ it 'should call post with specific params' do
258
+ model.instance_variable_set("@method", :post)
259
+ model.should_receive(:post).with('show/episode/watchlist').and_return(mock_model)
260
+
261
+ model.episode_watch_list
262
+ end
263
+
264
+ it 'should call params' do
265
+ model.should_receive(:params).and_return(mock_model)
266
+
267
+ model.episode_watch_list
268
+ end
269
+ end
270
+
271
+ describe '.library' do
272
+ it 'should call auth' do
273
+ model.should_receive(:auth).and_return(mock_model)
274
+
275
+ model.library
276
+ end
277
+
278
+ it 'should call post with specific params' do
279
+ model.instance_variable_set("@method", :post)
280
+ model.should_receive(:post).with('show/library').and_return(mock_model)
281
+
282
+ model.library
283
+ end
284
+
285
+ it 'should call params' do
286
+ model.should_receive(:params).and_return(mock_model)
287
+
288
+ model.library
289
+ end
290
+ end
291
+
292
+ describe '.related' do
293
+ it 'should call optional_auth' do
294
+ model.should_receive(:optional_auth).and_return(mock_model)
295
+
296
+ model.related
297
+ end
298
+
299
+ it 'should call get with specific params' do
300
+ model.instance_variable_set("@method", :get)
301
+ model.should_receive(:get).with('show/related').and_return(mock_model)
302
+
303
+ model.related
304
+ end
305
+
306
+ it 'should call restful_params' do
307
+ model.should_receive(:restful_params).and_return(mock_model)
308
+
309
+ model.related
310
+ end
311
+ end
312
+
313
+ describe '.scrobble' do
314
+ it 'should call auth' do
315
+ model.should_receive(:auth).and_return(mock_model)
316
+
317
+ model.scrobble
318
+ end
319
+
320
+ it 'should call post with specific params' do
321
+ model.instance_variable_set("@method", :post)
322
+ model.should_receive(:post).with('show/scrobble').and_return(mock_model)
323
+
324
+ model.scrobble
325
+ end
326
+
327
+ it 'should call params' do
328
+ model.should_receive(:params).and_return(mock_model)
329
+
330
+ model.scrobble
331
+ end
332
+ end
333
+
334
+ describe '.season' do
335
+ it 'should call optional_auth' do
336
+ model.should_receive(:optional_auth).and_return(mock_model)
337
+
338
+ model.season
339
+ end
340
+
341
+ it 'should call get with specific params' do
342
+ model.instance_variable_set("@method", :get)
343
+ model.should_receive(:get).with('show/season').and_return(mock_model)
344
+
345
+ model.season
346
+ end
347
+
348
+ it 'should call restful_params' do
349
+ model.should_receive(:restful_params).and_return(mock_model)
350
+
351
+ model.season
352
+ end
353
+ end
354
+
355
+ describe '.season_library' do
356
+ it 'should call auth' do
357
+ model.should_receive(:auth).and_return(mock_model)
358
+
359
+ model.season_library
360
+ end
361
+
362
+ it 'should call post with specific params' do
363
+ model.instance_variable_set("@method", :post)
364
+ model.should_receive(:post).with('show/season/library').and_return(mock_model)
365
+
366
+ model.season_library
367
+ end
368
+
369
+ it 'should call params' do
370
+ model.should_receive(:params).and_return(mock_model)
371
+
372
+ model.season_library
373
+ end
374
+ end
375
+
376
+ describe '.season_seen' do
377
+ it 'should call auth' do
378
+ model.should_receive(:auth).and_return(mock_model)
379
+
380
+ model.season_seen
381
+ end
382
+
383
+ it 'should call post with specific params' do
384
+ model.instance_variable_set("@method", :post)
385
+ model.should_receive(:post).with('show/season/seen').and_return(mock_model)
386
+
387
+ model.season_seen
388
+ end
389
+
390
+ it 'should call params' do
391
+ model.should_receive(:params).and_return(mock_model)
392
+
393
+ model.season_seen
394
+ end
395
+ end
396
+
397
+ describe '.seasons' do
398
+ it 'should call get with specific params' do
399
+ model.instance_variable_set("@method", :get)
400
+ model.should_receive(:get).with('show/seasons').and_return(mock_model)
401
+
402
+ model.seasons
403
+ end
404
+
405
+ it 'should call restful_params' do
406
+ model.should_receive(:restful_params).and_return(mock_model)
407
+
408
+ model.seasons
409
+ end
410
+ end
411
+
412
+ describe '.seen' do
413
+ it 'should call auth' do
414
+ model.should_receive(:auth).and_return(mock_model)
415
+
416
+ model.seen
417
+ end
418
+
419
+ it 'should call post with specific params' do
420
+ model.instance_variable_set("@method", :post)
421
+ model.should_receive(:post).with('show/seen').and_return(mock_model)
422
+
423
+ model.seen
424
+ end
425
+
426
+ it 'should call params' do
427
+ model.should_receive(:params).and_return(mock_model)
428
+
429
+ model.seen
430
+ end
431
+ end
432
+
433
+ describe '.stats' do
434
+ it 'should call get with specific params' do
435
+ model.instance_variable_set("@method", :get)
436
+ model.should_receive(:get).with('show/stats').and_return(mock_model)
437
+
438
+ model.stats
439
+ end
440
+
441
+ it 'should call restful_params' do
442
+ model.should_receive(:restful_params).and_return(mock_model)
443
+
444
+ model.stats
445
+ end
446
+ end
447
+
448
+ describe '.summary' do
449
+ it 'should call optional_auth' do
450
+ model.should_receive(:optional_auth).and_return(mock_model)
451
+
452
+ model.summary
453
+ end
454
+
455
+ it 'should call get with specific params' do
456
+ model.instance_variable_set("@method", :get)
457
+ model.should_receive(:get).with('show/summary').and_return(mock_model)
458
+
459
+ model.summary
460
+ end
461
+
462
+ it 'should call restful_params' do
463
+ model.should_receive(:restful_params).and_return(mock_model)
464
+
465
+ model.summary
466
+ end
467
+ end
468
+
469
+ describe '.summaries' do
470
+ it 'should call get with specific params' do
471
+ model.instance_variable_set("@method", :get)
472
+ model.should_receive(:get).with('show/summaries').and_return(mock_model)
473
+
474
+ model.summaries
475
+ end
476
+
477
+ it 'should call restful_params' do
478
+ model.should_receive(:restful_params).and_return(mock_model)
479
+
480
+ model.summaries
481
+ end
482
+ end
483
+
484
+ describe '.unlibrary' do
485
+ it 'should call auth' do
486
+ model.should_receive(:auth).and_return(mock_model)
487
+
488
+ model.unlibrary
489
+ end
490
+
491
+ it 'should call post with specific params' do
492
+ model.instance_variable_set("@method", :post)
493
+ model.should_receive(:post).with('show/unlibrary').and_return(mock_model)
494
+
495
+ model.unlibrary
496
+ end
497
+
498
+ it 'should call params' do
499
+ model.should_receive(:params).and_return(mock_model)
500
+
501
+ model.unlibrary
502
+ end
503
+ end
504
+
505
+ describe '.unwatch_list' do
506
+ it 'should call auth' do
507
+ model.should_receive(:auth).and_return(mock_model)
508
+
509
+ model.unwatch_list
510
+ end
511
+
512
+ it 'should call post with specific params' do
513
+ model.instance_variable_set("@method", :post)
514
+ model.should_receive(:post).with('show/unwatchlist').and_return(mock_model)
515
+
516
+ model.unwatch_list
517
+ end
518
+
519
+ it 'should call params' do
520
+ model.should_receive(:params).and_return(mock_model)
521
+
522
+ model.unwatch_list
523
+ end
524
+ end
525
+
526
+ describe '.watching' do
527
+ it 'should call auth' do
528
+ model.should_receive(:auth).and_return(mock_model)
529
+
530
+ model.watching
531
+ end
532
+
533
+ it 'should call post with specific params' do
534
+ model.instance_variable_set("@method", :post)
535
+ model.should_receive(:post).with('show/watching').and_return(mock_model)
536
+
537
+ model.watching
538
+ end
539
+
540
+ it 'should call params' do
541
+ model.should_receive(:params).and_return(mock_model)
542
+
543
+ model.watching
544
+ end
545
+ end
546
+
547
+ describe '.watching_now' do
548
+ it 'should call optional_auth' do
549
+ model.should_receive(:optional_auth).and_return(mock_model)
550
+
551
+ model.watching_now
552
+ end
553
+
554
+ it 'should call get with specific params' do
555
+ model.instance_variable_set("@method", :get)
556
+ model.should_receive(:get).with('show/watchingnow').and_return(mock_model)
557
+
558
+ model.watching_now
559
+ end
560
+
561
+ it 'should call restful_params' do
562
+ model.should_receive(:restful_params).and_return(mock_model)
563
+
564
+ model.watching_now
565
+ end
566
+ end
567
+
568
+ describe '.watch_list' do
569
+ it 'should call auth' do
570
+ model.should_receive(:auth).and_return(mock_model)
571
+
572
+ model.watch_list
573
+ end
574
+
575
+ it 'should call post with specific params' do
576
+ model.instance_variable_set("@method", :post)
577
+ model.should_receive(:post).with('show/watchlist').and_return(mock_model)
578
+
579
+ model.watch_list
580
+ end
581
+
582
+ it 'should call params' do
583
+ model.should_receive(:params).and_return(mock_model)
584
+
585
+ model.watch_list
586
+ end
587
+ end
588
+ end