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