enju_biblio 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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/icons/book.png +0 -0
  3. data/app/assets/images/icons/cd.png +0 -0
  4. data/app/assets/images/icons/dvd.png +0 -0
  5. data/app/assets/images/icons/monitor.png +0 -0
  6. data/app/controllers/carrier_types_controller.rb +8 -3
  7. data/app/controllers/manifestations_controller.rb +17 -4
  8. data/app/controllers/picture_files_controller.rb +1 -1
  9. data/app/controllers/series_statements_controller.rb +6 -0
  10. data/app/helpers/manifestations_helper.rb +1 -1
  11. data/app/models/agent_import_file_transition.rb +1 -0
  12. data/app/models/carrier_type.rb +11 -7
  13. data/app/models/import_request_transition.rb +1 -0
  14. data/app/models/manifestation.rb +5 -0
  15. data/app/models/resource_export_file_transition.rb +1 -0
  16. data/app/models/resource_import_file_transition.rb +1 -0
  17. data/app/views/carrier_types/index.html.erb +4 -1
  18. data/app/views/manifestations/_show_detail_librarian.html.erb +4 -0
  19. data/app/views/manifestations/index.html.erb +3 -0
  20. data/config/locales/translation_en.yml +2 -0
  21. data/config/locales/translation_ja.yml +2 -0
  22. data/lib/enju_biblio/biblio_helper.rb +1 -12
  23. data/lib/enju_biblio/version.rb +1 -1
  24. data/lib/generators/enju_biblio/setup/templates/config/schedule.rb +3 -3
  25. data/lib/tasks/carrier_type.rb +30 -18
  26. data/lib/tasks/enju_biblio_tasks.rake +2 -0
  27. data/spec/controllers/agent_import_files_controller_spec.rb +87 -87
  28. data/spec/controllers/agent_import_results_controller_spec.rb +22 -22
  29. data/spec/controllers/agent_merge_lists_controller_spec.rb +157 -157
  30. data/spec/controllers/agent_merges_controller_spec.rb +151 -151
  31. data/spec/controllers/agent_relationship_types_controller_spec.rb +152 -152
  32. data/spec/controllers/agent_relationships_controller_spec.rb +153 -153
  33. data/spec/controllers/agent_types_controller_spec.rb +49 -50
  34. data/spec/controllers/agents_controller_spec.rb +234 -234
  35. data/spec/controllers/carrier_types_controller_spec.rb +123 -103
  36. data/spec/controllers/content_types_controller_spec.rb +51 -52
  37. data/spec/controllers/countries_controller_spec.rb +156 -156
  38. data/spec/controllers/create_types_controller_spec.rb +48 -49
  39. data/spec/controllers/creates_controller_spec.rb +154 -154
  40. data/spec/controllers/donates_controller_spec.rb +153 -153
  41. data/spec/controllers/form_of_works_controller_spec.rb +48 -49
  42. data/spec/controllers/frequencies_controller_spec.rb +51 -52
  43. data/spec/controllers/identifier_types_controller_spec.rb +48 -49
  44. data/spec/controllers/import_requests_controller_spec.rb +165 -164
  45. data/spec/controllers/items_controller_spec.rb +214 -216
  46. data/spec/controllers/languages_controller_spec.rb +109 -109
  47. data/spec/controllers/licenses_controller_spec.rb +48 -49
  48. data/spec/controllers/manifestation_relationship_types_controller_spec.rb +152 -152
  49. data/spec/controllers/manifestation_relationships_controller_spec.rb +153 -153
  50. data/spec/controllers/manifestations_controller_spec.rb +319 -289
  51. data/spec/controllers/medium_of_performances_controller_spec.rb +48 -49
  52. data/spec/controllers/owns_controller_spec.rb +153 -153
  53. data/spec/controllers/picture_files_controller_spec.rb +156 -156
  54. data/spec/controllers/produce_types_controller_spec.rb +48 -49
  55. data/spec/controllers/produces_controller_spec.rb +154 -154
  56. data/spec/controllers/realize_types_controller_spec.rb +48 -49
  57. data/spec/controllers/realizes_controller_spec.rb +155 -155
  58. data/spec/controllers/resource_export_files_controller_spec.rb +72 -72
  59. data/spec/controllers/resource_import_files_controller_spec.rb +90 -90
  60. data/spec/controllers/resource_import_results_controller_spec.rb +43 -43
  61. data/spec/controllers/series_statement_merge_lists_controller_spec.rb +153 -153
  62. data/spec/controllers/series_statement_merges_controller_spec.rb +151 -151
  63. data/spec/controllers/series_statements_controller_spec.rb +154 -154
  64. data/spec/factories/checkout.rb +9 -0
  65. data/spec/factories/library.rb +13 -0
  66. data/spec/factories/shelf.rb +6 -0
  67. data/spec/fixtures/carrier_types.yml +11 -7
  68. data/spec/models/carrier_type_spec.rb +11 -7
  69. data/spec/models/resource_export_file_spec.rb +58 -16
  70. data/spec/support/resque.rb +0 -1
  71. data/spec/views/manifestations/show.html.erb_spec.rb +5 -0
  72. data/spec/views/resource_import_files/index.html.erb_spec.rb +1 -1
  73. data/spec/views/resource_import_files/show.html.erb_spec.rb +1 -1
  74. data/spec/views/resource_import_results/index.html.erb_spec.rb +1 -1
  75. data/spec/views/resource_import_results/show.html.erb_spec.rb +1 -1
  76. metadata +49 -39
@@ -9,113 +9,113 @@ describe DonatesController do
9
9
  FactoryGirl.attributes_for(:donate)
10
10
  end
11
11
 
12
- describe "GET index" do
13
- describe "When logged in as Administrator" do
12
+ describe 'GET index' do
13
+ describe 'When logged in as Administrator' do
14
14
  login_fixture_admin
15
15
 
16
- it "assigns all donates as @donates" do
16
+ it 'assigns all donates as @donates' do
17
17
  get :index
18
18
  expect(assigns(:donates)).to eq(Donate.order('id DESC').page(1))
19
19
  end
20
20
  end
21
21
 
22
- describe "When logged in as Librarian" do
22
+ describe 'When logged in as Librarian' do
23
23
  login_fixture_librarian
24
24
 
25
- it "assigns all donates as @donates" do
25
+ it 'assigns all donates as @donates' do
26
26
  get :index
27
27
  expect(assigns(:donates)).to eq(Donate.order('id DESC').page(1))
28
28
  end
29
29
  end
30
30
 
31
- describe "When logged in as User" do
31
+ describe 'When logged in as User' do
32
32
  login_fixture_user
33
33
 
34
- it "assigns all donates as @donates" do
34
+ it 'assigns all donates as @donates' do
35
35
  get :index
36
36
  expect(assigns(:donates)).to be_nil
37
37
  end
38
38
  end
39
39
 
40
- describe "When not logged in" do
41
- it "assigns all donates as @donates" do
40
+ describe 'When not logged in' do
41
+ it 'assigns all donates as @donates' do
42
42
  get :index
43
43
  expect(assigns(:donates)).to be_nil
44
44
  end
45
45
  end
46
46
  end
47
47
 
48
- describe "GET show" do
49
- describe "When logged in as Administrator" do
48
+ describe 'GET show' do
49
+ describe 'When logged in as Administrator' do
50
50
  login_fixture_admin
51
51
 
52
- it "assigns the requested donate as @donate" do
52
+ it 'assigns the requested donate as @donate' do
53
53
  donate = FactoryGirl.create(:donate)
54
- get :show, :id => donate.id
54
+ get :show, id: donate.id
55
55
  expect(assigns(:donate)).to eq(donate)
56
56
  end
57
57
  end
58
58
 
59
- describe "When logged in as Librarian" do
59
+ describe 'When logged in as Librarian' do
60
60
  login_fixture_librarian
61
61
 
62
- it "assigns the requested donate as @donate" do
62
+ it 'assigns the requested donate as @donate' do
63
63
  donate = FactoryGirl.create(:donate)
64
- get :show, :id => donate.id
64
+ get :show, id: donate.id
65
65
  expect(assigns(:donate)).to eq(donate)
66
66
  end
67
67
  end
68
68
 
69
- describe "When logged in as User" do
69
+ describe 'When logged in as User' do
70
70
  login_fixture_user
71
71
 
72
- it "assigns the requested donate as @donate" do
72
+ it 'assigns the requested donate as @donate' do
73
73
  donate = FactoryGirl.create(:donate)
74
- get :show, :id => donate.id
74
+ get :show, id: donate.id
75
75
  expect(assigns(:donate)).to eq(donate)
76
76
  end
77
77
  end
78
78
 
79
- describe "When not logged in" do
80
- it "assigns the requested donate as @donate" do
79
+ describe 'When not logged in' do
80
+ it 'assigns the requested donate as @donate' do
81
81
  donate = FactoryGirl.create(:donate)
82
- get :show, :id => donate.id
82
+ get :show, id: donate.id
83
83
  expect(assigns(:donate)).to eq(donate)
84
84
  end
85
85
  end
86
86
  end
87
87
 
88
- describe "GET new" do
89
- describe "When logged in as Administrator" do
90
- login_fixture_admin
88
+ describe 'GET new' do
89
+ describe 'When logged in as Administrator' do
90
+ login_fixture_admin
91
91
 
92
- it "assigns the requested donate as @donate" do
92
+ it 'assigns the requested donate as @donate' do
93
93
  get :new
94
94
  expect(assigns(:donate)).not_to be_valid
95
95
  end
96
96
  end
97
97
 
98
- describe "When logged in as Librarian" do
98
+ describe 'When logged in as Librarian' do
99
99
  login_fixture_librarian
100
100
 
101
- it "assigns the requested donate as @donate" do
101
+ it 'assigns the requested donate as @donate' do
102
102
  get :new
103
103
  expect(assigns(:donate)).not_to be_valid
104
104
  end
105
105
  end
106
106
 
107
- describe "When logged in as User" do
107
+ describe 'When logged in as User' do
108
108
  login_fixture_user
109
109
 
110
- it "should not assign the requested donate as @donate" do
110
+ it 'should not assign the requested donate as @donate' do
111
111
  get :new
112
112
  expect(assigns(:donate)).to be_nil
113
113
  expect(response).to be_forbidden
114
114
  end
115
115
  end
116
116
 
117
- describe "When not logged in" do
118
- it "should not assign the requested donate as @donate" do
117
+ describe 'When not logged in' do
118
+ it 'should not assign the requested donate as @donate' do
119
119
  get :new
120
120
  expect(assigns(:donate)).to be_nil
121
121
  expect(response).to redirect_to(new_user_session_url)
@@ -123,315 +123,315 @@ describe DonatesController do
123
123
  end
124
124
  end
125
125
 
126
- describe "GET edit" do
127
- describe "When logged in as Administrator" do
126
+ describe 'GET edit' do
127
+ describe 'When logged in as Administrator' do
128
128
  login_fixture_admin
129
129
 
130
- it "assigns the requested donate as @donate" do
130
+ it 'assigns the requested donate as @donate' do
131
131
  donate = FactoryGirl.create(:donate)
132
- get :edit, :id => donate.id
132
+ get :edit, id: donate.id
133
133
  expect(assigns(:donate)).to eq(donate)
134
134
  end
135
135
  end
136
136
 
137
- describe "When logged in as Librarian" do
137
+ describe 'When logged in as Librarian' do
138
138
  login_fixture_librarian
139
139
 
140
- it "assigns the requested donate as @donate" do
140
+ it 'assigns the requested donate as @donate' do
141
141
  donate = FactoryGirl.create(:donate)
142
- get :edit, :id => donate.id
142
+ get :edit, id: donate.id
143
143
  expect(assigns(:donate)).to eq(donate)
144
144
  end
145
145
  end
146
146
 
147
- describe "When logged in as User" do
147
+ describe 'When logged in as User' do
148
148
  login_fixture_user
149
149
 
150
- it "assigns the requested donate as @donate" do
150
+ it 'assigns the requested donate as @donate' do
151
151
  donate = FactoryGirl.create(:donate)
152
- get :edit, :id => donate.id
152
+ get :edit, id: donate.id
153
153
  expect(response).to be_forbidden
154
154
  end
155
155
  end
156
156
 
157
- describe "When not logged in" do
158
- it "should not assign the requested donate as @donate" do
157
+ describe 'When not logged in' do
158
+ it 'should not assign the requested donate as @donate' do
159
159
  donate = FactoryGirl.create(:donate)
160
- get :edit, :id => donate.id
160
+ get :edit, id: donate.id
161
161
  expect(response).to redirect_to(new_user_session_url)
162
162
  end
163
163
  end
164
164
  end
165
165
 
166
- describe "POST create" do
166
+ describe 'POST create' do
167
167
  before(:each) do
168
168
  @attrs = valid_attributes
169
- @invalid_attrs = {:item_id => ''}
169
+ @invalid_attrs = { item_id: '' }
170
170
  end
171
171
 
172
- describe "When logged in as Administrator" do
172
+ describe 'When logged in as Administrator' do
173
173
  login_fixture_admin
174
174
 
175
- describe "with valid params" do
176
- it "assigns a newly created donate as @donate" do
177
- post :create, :donate => @attrs
175
+ describe 'with valid params' do
176
+ it 'assigns a newly created donate as @donate' do
177
+ post :create, donate: @attrs
178
178
  expect(assigns(:donate)).to be_valid
179
179
  end
180
180
 
181
- it "redirects to the created donate" do
182
- post :create, :donate => @attrs
181
+ it 'redirects to the created donate' do
182
+ post :create, donate: @attrs
183
183
  expect(response).to redirect_to(donate_url(assigns(:donate)))
184
184
  end
185
185
  end
186
186
 
187
- describe "with invalid params" do
188
- it "assigns a newly created but unsaved donate as @donate" do
189
- post :create, :donate => @invalid_attrs
187
+ describe 'with invalid params' do
188
+ it 'assigns a newly created but unsaved donate as @donate' do
189
+ post :create, donate: @invalid_attrs
190
190
  expect(assigns(:donate)).not_to be_valid
191
191
  end
192
192
 
193
193
  it "re-renders the 'new' template" do
194
- post :create, :donate => @invalid_attrs
195
- expect(response).to render_template("new")
194
+ post :create, donate: @invalid_attrs
195
+ expect(response).to 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 donate as @donate" do
205
- post :create, :donate => @attrs
203
+ describe 'with valid params' do
204
+ it 'assigns a newly created donate as @donate' do
205
+ post :create, donate: @attrs
206
206
  expect(assigns(:donate)).to be_valid
207
207
  end
208
208
 
209
- it "redirects to the created donate" do
210
- post :create, :donate => @attrs
209
+ it 'redirects to the created donate' do
210
+ post :create, donate: @attrs
211
211
  expect(response).to redirect_to(donate_url(assigns(:donate)))
212
212
  end
213
213
  end
214
214
 
215
- describe "with invalid params" do
216
- it "assigns a newly created but unsaved donate as @donate" do
217
- post :create, :donate => @invalid_attrs
215
+ describe 'with invalid params' do
216
+ it 'assigns a newly created but unsaved donate as @donate' do
217
+ post :create, donate: @invalid_attrs
218
218
  expect(assigns(:donate)).not_to be_valid
219
219
  end
220
220
 
221
221
  it "re-renders the 'new' template" do
222
- post :create, :donate => @invalid_attrs
223
- expect(response).to render_template("new")
222
+ post :create, donate: @invalid_attrs
223
+ expect(response).to 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 donate as @donate" do
233
- post :create, :donate => @attrs
231
+ describe 'with valid params' do
232
+ it 'assigns a newly created donate as @donate' do
233
+ post :create, donate: @attrs
234
234
  expect(assigns(:donate)).to be_nil
235
235
  end
236
236
 
237
- it "should be forbidden" do
238
- post :create, :donate => @attrs
237
+ it 'should be forbidden' do
238
+ post :create, donate: @attrs
239
239
  expect(response).to be_forbidden
240
240
  end
241
241
  end
242
242
 
243
- describe "with invalid params" do
244
- it "assigns a newly created but unsaved donate as @donate" do
245
- post :create, :donate => @invalid_attrs
243
+ describe 'with invalid params' do
244
+ it 'assigns a newly created but unsaved donate as @donate' do
245
+ post :create, donate: @invalid_attrs
246
246
  expect(assigns(:donate)).to be_nil
247
247
  end
248
248
 
249
- it "should be forbidden" do
250
- post :create, :donate => @invalid_attrs
249
+ it 'should be forbidden' do
250
+ post :create, donate: @invalid_attrs
251
251
  expect(response).to 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 donate as @donate" do
259
- post :create, :donate => @attrs
256
+ describe 'When not logged in' do
257
+ describe 'with valid params' do
258
+ it 'assigns a newly created donate as @donate' do
259
+ post :create, donate: @attrs
260
260
  expect(assigns(:donate)).to be_nil
261
261
  end
262
262
 
263
- it "should be forbidden" do
264
- post :create, :donate => @attrs
263
+ it 'should be forbidden' do
264
+ post :create, donate: @attrs
265
265
  expect(response).to 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 donate as @donate" do
271
- post :create, :donate => @invalid_attrs
269
+ describe 'with invalid params' do
270
+ it 'assigns a newly created but unsaved donate as @donate' do
271
+ post :create, donate: @invalid_attrs
272
272
  expect(assigns(:donate)).to be_nil
273
273
  end
274
274
 
275
- it "should be forbidden" do
276
- post :create, :donate => @invalid_attrs
275
+ it 'should be forbidden' do
276
+ post :create, donate: @invalid_attrs
277
277
  expect(response).to 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
  @donate = FactoryGirl.create(:donate)
286
286
  @attrs = valid_attributes
287
- @invalid_attrs = {:item_id => ''}
287
+ @invalid_attrs = { item_id: '' }
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 donate" do
295
- put :update, :id => @donate.id, :donate => @attrs
293
+ describe 'with valid params' do
294
+ it 'updates the requested donate' do
295
+ put :update, id: @donate.id, donate: @attrs
296
296
  end
297
297
 
298
- it "assigns the requested donate as @donate" do
299
- put :update, :id => @donate.id, :donate => @attrs
298
+ it 'assigns the requested donate as @donate' do
299
+ put :update, id: @donate.id, donate: @attrs
300
300
  expect(assigns(:donate)).to eq(@donate)
301
301
  end
302
302
  end
303
303
 
304
- describe "with invalid params" do
305
- it "assigns the requested donate as @donate" do
306
- put :update, :id => @donate.id, :donate => @invalid_attrs
307
- expect(response).to render_template("edit")
304
+ describe 'with invalid params' do
305
+ it 'assigns the requested donate as @donate' do
306
+ put :update, id: @donate.id, donate: @invalid_attrs
307
+ expect(response).to 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 donate" do
317
- put :update, :id => @donate.id, :donate => @attrs
315
+ describe 'with valid params' do
316
+ it 'updates the requested donate' do
317
+ put :update, id: @donate.id, donate: @attrs
318
318
  end
319
319
 
320
- it "assigns the requested donate as @donate" do
321
- put :update, :id => @donate.id, :donate => @attrs
320
+ it 'assigns the requested donate as @donate' do
321
+ put :update, id: @donate.id, donate: @attrs
322
322
  expect(assigns(:donate)).to eq(@donate)
323
323
  expect(response).to redirect_to(@donate)
324
324
  end
325
325
  end
326
326
 
327
- describe "with invalid params" do
328
- it "assigns the donate as @donate" do
329
- put :update, :id => @donate, :donate => @invalid_attrs
327
+ describe 'with invalid params' do
328
+ it 'assigns the donate as @donate' do
329
+ put :update, id: @donate, donate: @invalid_attrs
330
330
  expect(assigns(:donate)).not_to be_valid
331
331
  end
332
332
 
333
333
  it "re-renders the 'edit' template" do
334
- put :update, :id => @donate, :donate => @invalid_attrs
335
- expect(response).to render_template("edit")
334
+ put :update, id: @donate, donate: @invalid_attrs
335
+ expect(response).to 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 donate" do
345
- put :update, :id => @donate.id, :donate => @attrs
343
+ describe 'with valid params' do
344
+ it 'updates the requested donate' do
345
+ put :update, id: @donate.id, donate: @attrs
346
346
  end
347
347
 
348
- it "assigns the requested donate as @donate" do
349
- put :update, :id => @donate.id, :donate => @attrs
348
+ it 'assigns the requested donate as @donate' do
349
+ put :update, id: @donate.id, donate: @attrs
350
350
  expect(assigns(:donate)).to eq(@donate)
351
351
  expect(response).to be_forbidden
352
352
  end
353
353
  end
354
354
 
355
- describe "with invalid params" do
356
- it "assigns the requested donate as @donate" do
357
- put :update, :id => @donate.id, :donate => @invalid_attrs
355
+ describe 'with invalid params' do
356
+ it 'assigns the requested donate as @donate' do
357
+ put :update, id: @donate.id, donate: @invalid_attrs
358
358
  expect(response).to 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 donate" do
366
- put :update, :id => @donate.id, :donate => @attrs
363
+ describe 'When not logged in' do
364
+ describe 'with valid params' do
365
+ it 'updates the requested donate' do
366
+ put :update, id: @donate.id, donate: @attrs
367
367
  end
368
368
 
369
- it "should be forbidden" do
370
- put :update, :id => @donate.id, :donate => @attrs
369
+ it 'should be forbidden' do
370
+ put :update, id: @donate.id, donate: @attrs
371
371
  expect(response).to 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 donate as @donate" do
377
- put :update, :id => @donate.id, :donate => @invalid_attrs
375
+ describe 'with invalid params' do
376
+ it 'assigns the requested donate as @donate' do
377
+ put :update, id: @donate.id, donate: @invalid_attrs
378
378
  expect(response).to 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
  @donate = FactoryGirl.create(:donate)
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 donate" do
393
- delete :destroy, :id => @donate.id
392
+ it 'destroys the requested donate' do
393
+ delete :destroy, id: @donate.id
394
394
  end
395
395
 
396
- it "redirects to the donates list" do
397
- delete :destroy, :id => @donate.id
396
+ it 'redirects to the donates list' do
397
+ delete :destroy, id: @donate.id
398
398
  expect(response).to redirect_to(donates_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 donate" do
406
- delete :destroy, :id => @donate.id
405
+ it 'destroys the requested donate' do
406
+ delete :destroy, id: @donate.id
407
407
  end
408
408
 
409
- it "should be forbidden" do
410
- delete :destroy, :id => @donate.id
409
+ it 'should be forbidden' do
410
+ delete :destroy, id: @donate.id
411
411
  expect(response).to redirect_to(donates_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 donate" do
419
- delete :destroy, :id => @donate.id
418
+ it 'destroys the requested donate' do
419
+ delete :destroy, id: @donate.id
420
420
  end
421
421
 
422
- it "should be forbidden" do
423
- delete :destroy, :id => @donate.id
422
+ it 'should be forbidden' do
423
+ delete :destroy, id: @donate.id
424
424
  expect(response).to be_forbidden
425
425
  end
426
426
  end
427
427
 
428
- describe "When not logged in" do
429
- it "destroys the requested donate" do
430
- delete :destroy, :id => @donate.id
428
+ describe 'When not logged in' do
429
+ it 'destroys the requested donate' do
430
+ delete :destroy, id: @donate.id
431
431
  end
432
432
 
433
- it "should be forbidden" do
434
- delete :destroy, :id => @donate.id
433
+ it 'should be forbidden' do
434
+ delete :destroy, id: @donate.id
435
435
  expect(response).to redirect_to(new_user_session_url)
436
436
  end
437
437
  end