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