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