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