enju_circulation 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/items_helper.rb +1 -1
  3. data/app/models/checked_item.rb +2 -1
  4. data/app/views/carrier_types/_carrier_type_has_checkout_type_fields.html.erb +1 -1
  5. data/lib/enju_circulation/version.rb +1 -1
  6. data/lib/tasks/enju_circulation_tasks.rake +3 -2
  7. data/spec/controllers/carrier_type_has_checkout_types_controller_spec.rb +152 -152
  8. data/spec/controllers/checked_items_controller_spec.rb +135 -135
  9. data/spec/controllers/checkins_controller_spec.rb +161 -161
  10. data/spec/controllers/checkout_types_controller_spec.rb +152 -152
  11. data/spec/controllers/checkouts_controller_spec.rb +103 -103
  12. data/spec/controllers/circulation_statuses_controller_spec.rb +152 -152
  13. data/spec/controllers/item_has_use_restrictions_controller_spec.rb +152 -152
  14. data/spec/controllers/lending_policies_controller_spec.rb +150 -150
  15. data/spec/controllers/manifestation_checkout_stats_controller_spec.rb +152 -152
  16. data/spec/controllers/manifestation_reserve_stats_controller_spec.rb +152 -152
  17. data/spec/controllers/profiles_controller_spec.rb +4 -4
  18. data/spec/controllers/reserves_controller_spec.rb +249 -249
  19. data/spec/controllers/use_restrictions_controller_spec.rb +153 -153
  20. data/spec/controllers/user_checkout_stats_controller_spec.rb +152 -152
  21. data/spec/controllers/user_group_has_checkout_types_controller_spec.rb +150 -150
  22. data/spec/controllers/user_reserve_stats_controller_spec.rb +152 -152
  23. data/spec/dummy/db/schema.rb +12 -2
  24. data/spec/fixtures/checked_items.yml +2 -1
  25. data/spec/helpers/items_helper_spec.rb +0 -1
  26. data/spec/models/checked_item_spec.rb +2 -1
  27. metadata +3 -17
@@ -3,117 +3,117 @@ require 'rails_helper'
3
3
  describe ManifestationCheckoutStatsController do
4
4
  fixtures :all
5
5
 
6
- describe "GET index" do
6
+ describe 'GET index' do
7
7
  before(:each) do
8
8
  FactoryGirl.create(:manifestation_checkout_stat)
9
9
  end
10
10
 
11
- describe "When logged in as Administrator" do
11
+ describe 'When logged in as Administrator' do
12
12
  login_fixture_admin
13
13
 
14
- it "assigns all manifestation_checkout_stats as @manifestation_checkout_stats" do
14
+ it 'assigns all manifestation_checkout_stats as @manifestation_checkout_stats' do
15
15
  get :index
16
16
  assigns(:manifestation_checkout_stats).should eq(ManifestationCheckoutStat.page(1))
17
17
  end
18
18
  end
19
19
 
20
- describe "When logged in as Librarian" do
20
+ describe 'When logged in as Librarian' do
21
21
  login_fixture_librarian
22
22
 
23
- it "assigns all manifestation_checkout_stats as @manifestation_checkout_stats" do
23
+ it 'assigns all manifestation_checkout_stats as @manifestation_checkout_stats' do
24
24
  get :index
25
25
  assigns(:manifestation_checkout_stats).should eq(ManifestationCheckoutStat.page(1))
26
26
  end
27
27
  end
28
28
 
29
- describe "When logged in as User" do
29
+ describe 'When logged in as User' do
30
30
  login_fixture_user
31
31
 
32
- it "assigns all manifestation_checkout_stats as @manifestation_checkout_stats" do
32
+ it 'assigns all manifestation_checkout_stats as @manifestation_checkout_stats' do
33
33
  get :index
34
34
  assigns(:manifestation_checkout_stats).should eq(ManifestationCheckoutStat.page(1))
35
35
  end
36
36
  end
37
37
 
38
- describe "When not logged in" do
39
- it "should not assign manifestation_checkout_stats as @manifestation_checkout_stats" do
38
+ describe 'When not logged in' do
39
+ it 'should not assign manifestation_checkout_stats as @manifestation_checkout_stats' do
40
40
  get :index
41
41
  assigns(:manifestation_checkout_stats).should eq(ManifestationCheckoutStat.page(1))
42
42
  end
43
43
  end
44
44
  end
45
45
 
46
- describe "GET show" do
47
- describe "When logged in as Administrator" do
46
+ describe 'GET show' do
47
+ describe 'When logged in as Administrator' do
48
48
  login_fixture_admin
49
49
 
50
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
50
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
51
51
  manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
52
- get :show, :id => manifestation_checkout_stat.id
52
+ get :show, id: manifestation_checkout_stat.id
53
53
  assigns(:manifestation_checkout_stat).should eq(manifestation_checkout_stat)
54
54
  end
55
55
  end
56
56
 
57
- describe "When logged in as Librarian" do
57
+ describe 'When logged in as Librarian' do
58
58
  login_fixture_librarian
59
59
 
60
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
60
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
61
61
  manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
62
- get :show, :id => manifestation_checkout_stat.id
62
+ get :show, id: manifestation_checkout_stat.id
63
63
  assigns(:manifestation_checkout_stat).should eq(manifestation_checkout_stat)
64
64
  end
65
65
  end
66
66
 
67
- describe "When logged in as User" do
67
+ describe 'When logged in as User' do
68
68
  login_fixture_user
69
69
 
70
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
70
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
71
71
  manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
72
- get :show, :id => manifestation_checkout_stat.id
72
+ get :show, id: manifestation_checkout_stat.id
73
73
  assigns(:manifestation_checkout_stat).should eq(manifestation_checkout_stat)
74
74
  end
75
75
  end
76
76
 
77
- describe "When not logged in" do
78
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
77
+ describe 'When not logged in' do
78
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
79
79
  manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
80
- get :show, :id => manifestation_checkout_stat.id
80
+ get :show, id: manifestation_checkout_stat.id
81
81
  assigns(:manifestation_checkout_stat).should eq(manifestation_checkout_stat)
82
82
  end
83
83
  end
84
84
  end
85
85
 
86
- describe "GET new" do
87
- describe "When logged in as Administrator" do
86
+ describe 'GET new' do
87
+ describe 'When logged in as Administrator' do
88
88
  login_fixture_admin
89
89
 
90
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
90
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
91
91
  get :new
92
92
  assigns(:manifestation_checkout_stat).should_not be_valid
93
93
  end
94
94
  end
95
95
 
96
- describe "When logged in as Librarian" do
96
+ describe 'When logged in as Librarian' do
97
97
  login_fixture_librarian
98
98
 
99
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
99
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
100
100
  get :new
101
101
  assigns(:manifestation_checkout_stat).should_not be_valid
102
102
  end
103
103
  end
104
104
 
105
- describe "When logged in as User" do
105
+ describe 'When logged in as User' do
106
106
  login_fixture_user
107
107
 
108
- it "should not assign the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
108
+ it 'should not assign the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
109
109
  get :new
110
110
  assigns(:manifestation_checkout_stat).should be_nil
111
111
  response.should be_forbidden
112
112
  end
113
113
  end
114
114
 
115
- describe "When not logged in" do
116
- it "should not assign the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
115
+ describe 'When not logged in' do
116
+ it 'should not assign the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
117
117
  get :new
118
118
  assigns(:manifestation_checkout_stat).should be_nil
119
119
  response.should redirect_to(new_user_session_url)
@@ -121,317 +121,317 @@ describe ManifestationCheckoutStatsController do
121
121
  end
122
122
  end
123
123
 
124
- describe "GET edit" do
125
- describe "When logged in as Administrator" do
124
+ describe 'GET edit' do
125
+ describe 'When logged in as Administrator' do
126
126
  login_fixture_admin
127
127
 
128
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
128
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
129
129
  manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
130
- get :edit, :id => manifestation_checkout_stat.id
130
+ get :edit, id: manifestation_checkout_stat.id
131
131
  assigns(:manifestation_checkout_stat).should eq(manifestation_checkout_stat)
132
132
  end
133
133
  end
134
134
 
135
- describe "When logged in as Librarian" do
135
+ describe 'When logged in as Librarian' do
136
136
  login_fixture_librarian
137
137
 
138
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
138
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
139
139
  manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
140
- get :edit, :id => manifestation_checkout_stat.id
140
+ get :edit, id: manifestation_checkout_stat.id
141
141
  assigns(:manifestation_checkout_stat).should eq(manifestation_checkout_stat)
142
142
  end
143
143
  end
144
144
 
145
- describe "When logged in as User" do
145
+ describe 'When logged in as User' do
146
146
  login_fixture_user
147
147
 
148
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
148
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
149
149
  manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
150
- get :edit, :id => manifestation_checkout_stat.id
150
+ get :edit, id: manifestation_checkout_stat.id
151
151
  response.should be_forbidden
152
152
  end
153
153
  end
154
154
 
155
- describe "When not logged in" do
156
- it "should not assign the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
155
+ describe 'When not logged in' do
156
+ it 'should not assign the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
157
157
  manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
158
- get :edit, :id => manifestation_checkout_stat.id
158
+ get :edit, id: manifestation_checkout_stat.id
159
159
  response.should redirect_to(new_user_session_url)
160
160
  end
161
161
  end
162
162
  end
163
163
 
164
- describe "POST create" do
164
+ describe 'POST create' do
165
165
  before(:each) do
166
166
  @attrs = FactoryGirl.attributes_for(:manifestation_checkout_stat)
167
- @invalid_attrs = {:start_date => ''}
167
+ @invalid_attrs = { start_date: '' }
168
168
  end
169
169
 
170
- describe "When logged in as Administrator" do
170
+ describe 'When logged in as Administrator' do
171
171
  login_fixture_admin
172
172
 
173
- describe "with valid params" do
174
- it "assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat" do
175
- post :create, :manifestation_checkout_stat => @attrs
173
+ describe 'with valid params' do
174
+ it 'assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat' do
175
+ post :create, manifestation_checkout_stat: @attrs
176
176
  assigns(:manifestation_checkout_stat).should be_valid
177
177
  assigns(:manifestation_checkout_stat).current_state.should eq 'completed'
178
178
  end
179
179
 
180
- it "redirects to the created manifestation_checkout_stat" do
181
- post :create, :manifestation_checkout_stat => @attrs
180
+ it 'redirects to the created manifestation_checkout_stat' do
181
+ post :create, manifestation_checkout_stat: @attrs
182
182
  response.should redirect_to(manifestation_checkout_stat_url(assigns(:manifestation_checkout_stat)))
183
183
  end
184
184
  end
185
185
 
186
- describe "with invalid params" do
187
- it "assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat" do
188
- post :create, :manifestation_checkout_stat => @invalid_attrs
186
+ describe 'with invalid params' do
187
+ it 'assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat' do
188
+ post :create, manifestation_checkout_stat: @invalid_attrs
189
189
  assigns(:manifestation_checkout_stat).should_not be_valid
190
190
  assigns(:manifestation_checkout_stat).current_state.should eq 'pending'
191
191
  end
192
192
 
193
193
  it "re-renders the 'new' template" do
194
- post :create, :manifestation_checkout_stat => @invalid_attrs
195
- response.should render_template("new")
194
+ post :create, manifestation_checkout_stat: @invalid_attrs
195
+ response.should render_template('new')
196
196
  end
197
197
  end
198
198
  end
199
199
 
200
- describe "When logged in as Librarian" do
200
+ describe 'When logged in as Librarian' do
201
201
  login_fixture_librarian
202
202
 
203
- describe "with valid params" do
204
- it "assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat" do
205
- post :create, :manifestation_checkout_stat => @attrs
203
+ describe 'with valid params' do
204
+ it 'assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat' do
205
+ post :create, manifestation_checkout_stat: @attrs
206
206
  assigns(:manifestation_checkout_stat).should be_valid
207
207
  end
208
208
 
209
- it "redirects to the created manifestation_checkout_stat" do
210
- post :create, :manifestation_checkout_stat => @attrs
209
+ it 'redirects to the created manifestation_checkout_stat' do
210
+ post :create, manifestation_checkout_stat: @attrs
211
211
  response.should redirect_to(manifestation_checkout_stat_url(assigns(:manifestation_checkout_stat)))
212
212
  end
213
213
  end
214
214
 
215
- describe "with invalid params" do
216
- it "assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat" do
217
- post :create, :manifestation_checkout_stat => @invalid_attrs
215
+ describe 'with invalid params' do
216
+ it 'assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat' do
217
+ post :create, manifestation_checkout_stat: @invalid_attrs
218
218
  assigns(:manifestation_checkout_stat).should_not be_valid
219
219
  end
220
220
 
221
221
  it "re-renders the 'new' template" do
222
- post :create, :manifestation_checkout_stat => @invalid_attrs
223
- response.should render_template("new")
222
+ post :create, manifestation_checkout_stat: @invalid_attrs
223
+ response.should render_template('new')
224
224
  end
225
225
  end
226
226
  end
227
227
 
228
- describe "When logged in as User" do
228
+ describe 'When logged in as User' do
229
229
  login_fixture_user
230
230
 
231
- describe "with valid params" do
232
- it "assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat" do
233
- post :create, :manifestation_checkout_stat => @attrs
231
+ describe 'with valid params' do
232
+ it 'assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat' do
233
+ post :create, manifestation_checkout_stat: @attrs
234
234
  assigns(:manifestation_checkout_stat).should be_nil
235
235
  end
236
236
 
237
- it "should be forbidden" do
238
- post :create, :manifestation_checkout_stat => @attrs
237
+ it 'should be forbidden' do
238
+ post :create, manifestation_checkout_stat: @attrs
239
239
  response.should be_forbidden
240
240
  end
241
241
  end
242
242
 
243
- describe "with invalid params" do
244
- it "assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat" do
245
- post :create, :manifestation_checkout_stat => @invalid_attrs
243
+ describe 'with invalid params' do
244
+ it 'assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat' do
245
+ post :create, manifestation_checkout_stat: @invalid_attrs
246
246
  assigns(:manifestation_checkout_stat).should be_nil
247
247
  end
248
248
 
249
- it "should be forbidden" do
250
- post :create, :manifestation_checkout_stat => @invalid_attrs
249
+ it 'should be forbidden' do
250
+ post :create, manifestation_checkout_stat: @invalid_attrs
251
251
  response.should be_forbidden
252
252
  end
253
253
  end
254
254
  end
255
255
 
256
- describe "When not logged in" do
257
- describe "with valid params" do
258
- it "assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat" do
259
- post :create, :manifestation_checkout_stat => @attrs
256
+ describe 'When not logged in' do
257
+ describe 'with valid params' do
258
+ it 'assigns a newly created manifestation_checkout_stat as @manifestation_checkout_stat' do
259
+ post :create, manifestation_checkout_stat: @attrs
260
260
  assigns(:manifestation_checkout_stat).should be_nil
261
261
  end
262
262
 
263
- it "should be forbidden" do
264
- post :create, :manifestation_checkout_stat => @attrs
263
+ it 'should be forbidden' do
264
+ post :create, manifestation_checkout_stat: @attrs
265
265
  response.should redirect_to(new_user_session_url)
266
266
  end
267
267
  end
268
268
 
269
- describe "with invalid params" do
270
- it "assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat" do
271
- post :create, :manifestation_checkout_stat => @invalid_attrs
269
+ describe 'with invalid params' do
270
+ it 'assigns a newly created but unsaved manifestation_checkout_stat as @manifestation_checkout_stat' do
271
+ post :create, manifestation_checkout_stat: @invalid_attrs
272
272
  assigns(:manifestation_checkout_stat).should be_nil
273
273
  end
274
274
 
275
- it "should be forbidden" do
276
- post :create, :manifestation_checkout_stat => @invalid_attrs
275
+ it 'should be forbidden' do
276
+ post :create, manifestation_checkout_stat: @invalid_attrs
277
277
  response.should redirect_to(new_user_session_url)
278
278
  end
279
279
  end
280
280
  end
281
281
  end
282
282
 
283
- describe "PUT update" do
283
+ describe 'PUT update' do
284
284
  before(:each) do
285
285
  @manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
286
286
  @attrs = FactoryGirl.attributes_for(:manifestation_checkout_stat)
287
- @invalid_attrs = {:start_date => ''}
287
+ @invalid_attrs = { start_date: '' }
288
288
  end
289
289
 
290
- describe "When logged in as Administrator" do
290
+ describe 'When logged in as Administrator' do
291
291
  login_fixture_admin
292
292
 
293
- describe "with valid params" do
294
- it "updates the requested manifestation_checkout_stat" do
295
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @attrs
293
+ describe 'with valid params' do
294
+ it 'updates the requested manifestation_checkout_stat' do
295
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @attrs
296
296
  end
297
297
 
298
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
299
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @attrs
298
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
299
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @attrs
300
300
  assigns(:manifestation_checkout_stat).should eq(@manifestation_checkout_stat)
301
301
  end
302
302
  end
303
303
 
304
- describe "with invalid params" do
305
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
306
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @invalid_attrs
307
- response.should render_template("edit")
304
+ describe 'with invalid params' do
305
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
306
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @invalid_attrs
307
+ response.should render_template('edit')
308
308
  end
309
309
  end
310
310
  end
311
311
 
312
- describe "When logged in as Librarian" do
312
+ describe 'When logged in as Librarian' do
313
313
  login_fixture_librarian
314
314
 
315
- describe "with valid params" do
316
- it "updates the requested manifestation_checkout_stat" do
317
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @attrs
315
+ describe 'with valid params' do
316
+ it 'updates the requested manifestation_checkout_stat' do
317
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @attrs
318
318
  end
319
319
 
320
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
321
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @attrs
320
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
321
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @attrs
322
322
  assigns(:manifestation_checkout_stat).should eq(@manifestation_checkout_stat)
323
323
  response.should redirect_to(@manifestation_checkout_stat)
324
324
  end
325
325
  end
326
326
 
327
- describe "with invalid params" do
328
- it "assigns the manifestation_checkout_stat as @manifestation_checkout_stat" do
329
- put :update, :id => @manifestation_checkout_stat, :manifestation_checkout_stat => @invalid_attrs
327
+ describe 'with invalid params' do
328
+ it 'assigns the manifestation_checkout_stat as @manifestation_checkout_stat' do
329
+ put :update, id: @manifestation_checkout_stat, manifestation_checkout_stat: @invalid_attrs
330
330
  assigns(:manifestation_checkout_stat).should_not be_valid
331
331
  end
332
332
 
333
333
  it "re-renders the 'edit' template" do
334
- put :update, :id => @manifestation_checkout_stat, :manifestation_checkout_stat => @invalid_attrs
335
- response.should render_template("edit")
334
+ put :update, id: @manifestation_checkout_stat, manifestation_checkout_stat: @invalid_attrs
335
+ response.should render_template('edit')
336
336
  end
337
337
  end
338
338
  end
339
339
 
340
- describe "When logged in as User" do
340
+ describe 'When logged in as User' do
341
341
  login_fixture_user
342
342
 
343
- describe "with valid params" do
344
- it "updates the requested manifestation_checkout_stat" do
345
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @attrs
343
+ describe 'with valid params' do
344
+ it 'updates the requested manifestation_checkout_stat' do
345
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @attrs
346
346
  end
347
347
 
348
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
349
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @attrs
348
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
349
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @attrs
350
350
  assigns(:manifestation_checkout_stat).should eq(@manifestation_checkout_stat)
351
351
  response.should be_forbidden
352
352
  end
353
353
  end
354
354
 
355
- describe "with invalid params" do
356
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
357
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @invalid_attrs
355
+ describe 'with invalid params' do
356
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
357
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @invalid_attrs
358
358
  response.should be_forbidden
359
359
  end
360
360
  end
361
361
  end
362
362
 
363
- describe "When not logged in" do
364
- describe "with valid params" do
365
- it "updates the requested manifestation_checkout_stat" do
366
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @attrs
363
+ describe 'When not logged in' do
364
+ describe 'with valid params' do
365
+ it 'updates the requested manifestation_checkout_stat' do
366
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @attrs
367
367
  end
368
368
 
369
- it "should be forbidden" do
370
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @attrs
369
+ it 'should be forbidden' do
370
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @attrs
371
371
  response.should redirect_to(new_user_session_url)
372
372
  end
373
373
  end
374
374
 
375
- describe "with invalid params" do
376
- it "assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat" do
377
- put :update, :id => @manifestation_checkout_stat.id, :manifestation_checkout_stat => @invalid_attrs
375
+ describe 'with invalid params' do
376
+ it 'assigns the requested manifestation_checkout_stat as @manifestation_checkout_stat' do
377
+ put :update, id: @manifestation_checkout_stat.id, manifestation_checkout_stat: @invalid_attrs
378
378
  response.should redirect_to(new_user_session_url)
379
379
  end
380
380
  end
381
381
  end
382
382
  end
383
383
 
384
- describe "DELETE destroy" do
384
+ describe 'DELETE destroy' do
385
385
  before(:each) do
386
386
  @manifestation_checkout_stat = FactoryGirl.create(:manifestation_checkout_stat)
387
387
  end
388
388
 
389
- describe "When logged in as Administrator" do
389
+ describe 'When logged in as Administrator' do
390
390
  login_fixture_admin
391
391
 
392
- it "destroys the requested manifestation_checkout_stat" do
393
- delete :destroy, :id => @manifestation_checkout_stat.id
392
+ it 'destroys the requested manifestation_checkout_stat' do
393
+ delete :destroy, id: @manifestation_checkout_stat.id
394
394
  end
395
395
 
396
- it "redirects to the manifestation_checkout_stats list" do
397
- delete :destroy, :id => @manifestation_checkout_stat.id
396
+ it 'redirects to the manifestation_checkout_stats list' do
397
+ delete :destroy, id: @manifestation_checkout_stat.id
398
398
  response.should redirect_to(manifestation_checkout_stats_url)
399
399
  end
400
400
  end
401
401
 
402
- describe "When logged in as Librarian" do
402
+ describe 'When logged in as Librarian' do
403
403
  login_fixture_librarian
404
404
 
405
- it "destroys the requested manifestation_checkout_stat" do
406
- delete :destroy, :id => @manifestation_checkout_stat.id
405
+ it 'destroys the requested manifestation_checkout_stat' do
406
+ delete :destroy, id: @manifestation_checkout_stat.id
407
407
  end
408
408
 
409
- it "redirects to the manifestation_checkout_stats list" do
410
- delete :destroy, :id => @manifestation_checkout_stat.id
409
+ it 'redirects to the manifestation_checkout_stats list' do
410
+ delete :destroy, id: @manifestation_checkout_stat.id
411
411
  response.should redirect_to(manifestation_checkout_stats_url)
412
412
  end
413
413
  end
414
414
 
415
- describe "When logged in as User" do
415
+ describe 'When logged in as User' do
416
416
  login_fixture_user
417
417
 
418
- it "destroys the requested manifestation_checkout_stat" do
419
- delete :destroy, :id => @manifestation_checkout_stat.id
418
+ it 'destroys the requested manifestation_checkout_stat' do
419
+ delete :destroy, id: @manifestation_checkout_stat.id
420
420
  end
421
421
 
422
- it "should be forbidden" do
423
- delete :destroy, :id => @manifestation_checkout_stat.id
422
+ it 'should be forbidden' do
423
+ delete :destroy, id: @manifestation_checkout_stat.id
424
424
  response.should be_forbidden
425
425
  end
426
426
  end
427
427
 
428
- describe "When not logged in" do
429
- it "destroys the requested manifestation_checkout_stat" do
430
- delete :destroy, :id => @manifestation_checkout_stat.id
428
+ describe 'When not logged in' do
429
+ it 'destroys the requested manifestation_checkout_stat' do
430
+ delete :destroy, id: @manifestation_checkout_stat.id
431
431
  end
432
432
 
433
- it "should be forbidden" do
434
- delete :destroy, :id => @manifestation_checkout_stat.id
433
+ it 'should be forbidden' do
434
+ delete :destroy, id: @manifestation_checkout_stat.id
435
435
  response.should redirect_to(new_user_session_url)
436
436
  end
437
437
  end