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