enju_biblio 0.3.0.beta.2 → 0.3.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -1
- data/lib/enju_biblio/version.rb +1 -1
- data/spec/controllers/agent_import_files_controller_spec.rb +2 -2
- data/spec/controllers/agent_merge_lists_controller_spec.rb +2 -2
- data/spec/controllers/agent_merges_controller_spec.rb +2 -2
- data/spec/controllers/agent_relationship_types_controller_spec.rb +2 -2
- data/spec/controllers/agents_controller_spec.rb +12 -12
- data/spec/controllers/content_types_controller_spec.rb +1 -1
- data/spec/controllers/countries_controller_spec.rb +1 -1
- data/spec/controllers/frequencies_controller_spec.rb +1 -1
- data/spec/controllers/items_controller_spec.rb +6 -6
- data/spec/controllers/manifestation_relationship_types_controller_spec.rb +2 -2
- data/spec/controllers/manifestations_controller_spec.rb +27 -27
- data/spec/controllers/owns_controller_spec.rb +2 -2
- data/spec/controllers/resource_export_files_controller_spec.rb +4 -4
- data/spec/controllers/resource_import_files_controller_spec.rb +5 -5
- data/spec/controllers/series_statement_merges_controller_spec.rb +2 -2
- data/spec/controllers/series_statements_controller_spec.rb +4 -4
- data/spec/dummy/app/helpers/application_helper.rb +1 -1
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/db/migrate/002_devise_create_users.rb +0 -1
- data/spec/dummy/db/migrate/033_create_checkouts.rb +1 -1
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +1 -1
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +2 -2
- data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +1 -1
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -1
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -1
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140812153137_create_event_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +3 -4
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
- data/spec/factories/checkout.rb +1 -1
- data/spec/factories/create_types.rb +3 -3
- data/spec/factories/produce_types.rb +3 -3
- data/spec/factories/profile.rb +2 -2
- data/spec/factories/realize_types.rb +3 -3
- data/spec/factories/role.rb +1 -1
- data/spec/factories/user.rb +13 -13
- metadata +486 -472
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9befb066168f619e65a3db7d44bd7486c25cf2a
|
4
|
+
data.tar.gz: 209087ed9f3012db35e2f9fd4ce84e088746d4e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d39c5d6cef38eef9624dce4623618dcd780f7e5fe397fbb262dbb7781b59370a40c2153370dd458b14747cd2e70c3e4759ca699c42897c140ad507df90de705
|
7
|
+
data.tar.gz: 953e42d706ebb6c4e8e59af0aa5c97c056f73176eca5dcfae02c722708e7ad5ec3a77cc21d8f90514b4ee698a2cd1731a1cdd55d9098fe65497a1fc9ea2ae386
|
data/README.rdoc
CHANGED
@@ -7,4 +7,4 @@ This project rocks and uses MIT-LICENSE.
|
|
7
7
|
|
8
8
|
== 製作者・貢献者 (Authors and contributors)
|
9
9
|
* {TANABE, Kosuke}[https://github.com/nabeta] ({@nabeta}[https://twitter.com/nabeta])
|
10
|
-
* {Project Next-L}[
|
10
|
+
* {Project Next-L}[https://www.next-l.jp] ({@ProjectNextL}[https://twitter.com/ProjectNextL])
|
data/lib/enju_biblio/version.rb
CHANGED
@@ -85,7 +85,7 @@ describe AgentImportFilesController do
|
|
85
85
|
it 'assigns the requested agent_import_file as @agent_import_file' do
|
86
86
|
get :new
|
87
87
|
expect(assigns(:agent_import_file)).to_not be_valid
|
88
|
-
expect(response).to
|
88
|
+
expect(response).to be_successful
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
@@ -95,7 +95,7 @@ describe AgentImportFilesController do
|
|
95
95
|
it 'should not assign the requested agent_import_file as @agent_import_file' do
|
96
96
|
get :new
|
97
97
|
expect(assigns(:agent_import_file)).to_not be_valid
|
98
|
-
expect(response).to
|
98
|
+
expect(response).to be_successful
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
@@ -52,7 +52,7 @@ describe AgentMergeListsController do
|
|
52
52
|
it 'assigns the requested agent_merge_list as @agent_merge_list' do
|
53
53
|
get :show, params: { id: @agent_merge_list.id }
|
54
54
|
assigns(:agent_merge_list).should eq(@agent_merge_list)
|
55
|
-
response.should
|
55
|
+
response.should be_successful
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -62,7 +62,7 @@ describe AgentMergeListsController do
|
|
62
62
|
it 'assigns the requested agent_merge_list as @agent_merge_list' do
|
63
63
|
get :show, params: { id: @agent_merge_list.id }
|
64
64
|
assigns(:agent_merge_list).should eq(@agent_merge_list)
|
65
|
-
response.should
|
65
|
+
response.should be_successful
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -92,7 +92,7 @@ describe AgentMergesController do
|
|
92
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
|
-
response.should
|
95
|
+
response.should be_successful
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
@@ -102,7 +102,7 @@ describe AgentMergesController do
|
|
102
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
|
-
response.should
|
105
|
+
response.should be_successful
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
@@ -96,7 +96,7 @@ describe AgentRelationshipTypesController do
|
|
96
96
|
it 'assigns the requested agent_relationship_type as @agent_relationship_type' do
|
97
97
|
get :new
|
98
98
|
expect(assigns(:agent_relationship_type)).not_to be_valid
|
99
|
-
expect(response).to
|
99
|
+
expect(response).to be_successful
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
@@ -198,7 +198,7 @@ describe AgentRelationshipTypesController do
|
|
198
198
|
|
199
199
|
it 'should be successful' do
|
200
200
|
post :create, params: { agent_relationship_type: @invalid_attrs }
|
201
|
-
expect(response).to
|
201
|
+
expect(response).to be_successful
|
202
202
|
end
|
203
203
|
end
|
204
204
|
end
|
@@ -22,7 +22,7 @@ describe AgentsController do
|
|
22
22
|
|
23
23
|
it 'should get index with agent_id' do
|
24
24
|
get :index, params: { agent_id: 1 }
|
25
|
-
expect(response).to
|
25
|
+
expect(response).to be_successful
|
26
26
|
expect(assigns(:agent)).to eq Agent.find(1)
|
27
27
|
expect(assigns(:agents)).to eq assigns(:agent).derived_agents.where('required_role_id >= 1').page(1)
|
28
28
|
end
|
@@ -30,7 +30,7 @@ describe AgentsController do
|
|
30
30
|
it 'should get index with query' do
|
31
31
|
get :index, params: { query: 'Librarian1' }
|
32
32
|
expect(assigns(:agents)).not_to be_empty
|
33
|
-
expect(response).to
|
33
|
+
expect(response).to be_successful
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
@@ -70,7 +70,7 @@ describe AgentsController do
|
|
70
70
|
|
71
71
|
it 'should get index with agent_id' do
|
72
72
|
get :index, params: { agent_id: 1 }
|
73
|
-
expect(response).to
|
73
|
+
expect(response).to be_successful
|
74
74
|
expect(assigns(:agent)).to eq Agent.find(1)
|
75
75
|
expect(assigns(:agents)).to eq assigns(:agent).derived_agents.where(required_role_id: 1).page(1)
|
76
76
|
end
|
@@ -84,7 +84,7 @@ describe AgentsController do
|
|
84
84
|
it 'should get index with query' do
|
85
85
|
get :index, params: { query: 'Librarian1' }
|
86
86
|
expect(assigns(:agents)).to be_empty
|
87
|
-
expect(response).to
|
87
|
+
expect(response).to be_successful
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
@@ -114,13 +114,13 @@ describe AgentsController do
|
|
114
114
|
# it "should show agent when required_role is user" do
|
115
115
|
# get :show, :id => users(:user2).agent.id
|
116
116
|
# expect(assigns(:agent)).to eq(users(:user2).agent)
|
117
|
-
# expect(response).to
|
117
|
+
# expect(response).to be_successful
|
118
118
|
# end
|
119
119
|
|
120
120
|
# it "should show patron when required_role is librarian" do
|
121
121
|
# get :show, :id => users(:user1).agent.id
|
122
122
|
# expect(assigns(:agent)).to eq(users(:user1).agent)
|
123
|
-
# expect(response).to
|
123
|
+
# expect(response).to be_successful
|
124
124
|
# end
|
125
125
|
|
126
126
|
it 'should not show agent who does not create a work' do
|
@@ -155,7 +155,7 @@ describe AgentsController do
|
|
155
155
|
# it "should show user" do
|
156
156
|
# get :show, :id => users(:user2).agent.id
|
157
157
|
# assigns(:agent).required_role.name.should eq 'User'
|
158
|
-
# expect(response).to
|
158
|
+
# expect(response).to be_successful
|
159
159
|
# end
|
160
160
|
|
161
161
|
# it "should not show agent when required_role is 'Librarian'" do
|
@@ -248,12 +248,12 @@ describe AgentsController do
|
|
248
248
|
|
249
249
|
# it "should edit agent when its required_role is 'User'" do
|
250
250
|
# get :edit, :id => users(:user2).agent.id
|
251
|
-
# expect(response).to
|
251
|
+
# expect(response).to be_successful
|
252
252
|
# end
|
253
253
|
|
254
254
|
# it "should edit agent when its required_role is 'Librarian'" do
|
255
255
|
# get :edit, :id => users(:user1).agent.id
|
256
|
-
# expect(response).to
|
256
|
+
# expect(response).to be_successful
|
257
257
|
# end
|
258
258
|
|
259
259
|
# it "should edit admin" do
|
@@ -273,7 +273,7 @@ describe AgentsController do
|
|
273
273
|
|
274
274
|
# it "should edit myself" do
|
275
275
|
# get :edit, :id => users(:user1).agent.id
|
276
|
-
# expect(response).to
|
276
|
+
# expect(response).to be_successful
|
277
277
|
# end
|
278
278
|
|
279
279
|
# it "should not edit other user's agent profile" do
|
@@ -407,7 +407,7 @@ describe AgentsController do
|
|
407
407
|
# it "should not create agent myself" do
|
408
408
|
# post :create, :agent => { :full_name => 'test', :user_username => users(:user1).username }
|
409
409
|
# expect(assigns(:agent)).not_to be_valid
|
410
|
-
# expect(response).to
|
410
|
+
# expect(response).to be_successful
|
411
411
|
# end
|
412
412
|
|
413
413
|
# it "should not create other agent" do
|
@@ -536,7 +536,7 @@ describe AgentsController do
|
|
536
536
|
# it "should not update myself without name" do
|
537
537
|
# put :update, :id => users(:user1).agent.id, :agent => { :first_name => '', :last_name => '', :full_name => '' }
|
538
538
|
# expect(assigns(:agent)).not_to be_valid
|
539
|
-
# expect(response).to
|
539
|
+
# expect(response).to be_successful
|
540
540
|
# end
|
541
541
|
|
542
542
|
# it "should not update other agent" do
|
@@ -63,7 +63,7 @@ describe ContentTypesController do
|
|
63
63
|
manifestation = FactoryBot.create(:manifestation, content_type_id: content_type.id)
|
64
64
|
get :edit, params: { id: content_type.id }
|
65
65
|
expect(assigns(:content_type)).to eq content_type
|
66
|
-
expect(response).to
|
66
|
+
expect(response).to be_successful
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
@@ -63,7 +63,7 @@ describe FrequenciesController do
|
|
63
63
|
manifestation = FactoryBot.create(:manifestation, frequency_id: frequency.id)
|
64
64
|
get :edit, params: { id: frequency.id }
|
65
65
|
expect(assigns(:frequency)).to eq frequency
|
66
|
-
expect(response).to
|
66
|
+
expect(response).to be_successful
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
@@ -65,21 +65,21 @@ describe ItemsController do
|
|
65
65
|
|
66
66
|
it 'should get index with agent_id' do
|
67
67
|
get :index, params: { agent_id: 1 }
|
68
|
-
expect(response).to
|
68
|
+
expect(response).to be_successful
|
69
69
|
assigns(:agent).should eq Agent.find(1)
|
70
70
|
expect(assigns(:items)).to eq assigns(:agent).items.order('created_at DESC').page(1)
|
71
71
|
end
|
72
72
|
|
73
73
|
it 'should get index with manifestation_id' do
|
74
74
|
get :index, params: { manifestation_id: 1 }
|
75
|
-
expect(response).to
|
75
|
+
expect(response).to be_successful
|
76
76
|
assigns(:manifestation).should eq Manifestation.find(1)
|
77
77
|
assigns(:items).collect(&:id).should eq assigns(:manifestation).items.order('items.created_at DESC').page(1).collect(&:id)
|
78
78
|
end
|
79
79
|
|
80
80
|
it 'should get index with shelf_id' do
|
81
81
|
get :index, params: { shelf_id: 1 }
|
82
|
-
expect(response).to
|
82
|
+
expect(response).to be_successful
|
83
83
|
assigns(:shelf).should eq Shelf.find(1)
|
84
84
|
expect(assigns(:items)).to eq assigns(:shelf).items.order('created_at DESC').page(1)
|
85
85
|
end
|
@@ -144,7 +144,7 @@ describe ItemsController do
|
|
144
144
|
it 'assigns the requested item as @item' do
|
145
145
|
get :new, params: { manifestation_id: @manifestation.id }
|
146
146
|
expect(assigns(:item)).to be_valid
|
147
|
-
expect(response).to
|
147
|
+
expect(response).to be_successful
|
148
148
|
end
|
149
149
|
|
150
150
|
it 'should not get new without manifestation_id' do
|
@@ -174,7 +174,7 @@ describe ItemsController do
|
|
174
174
|
it 'assigns the requested item as @item' do
|
175
175
|
get :new, params: { manifestation_id: @manifestation.id }
|
176
176
|
expect(assigns(:item)).to be_valid
|
177
|
-
expect(response).to
|
177
|
+
expect(response).to be_successful
|
178
178
|
end
|
179
179
|
end
|
180
180
|
|
@@ -296,7 +296,7 @@ describe ItemsController do
|
|
296
296
|
it 'should not create item already created' do
|
297
297
|
post :create, params: { item: { circulation_status_id: 1, item_identifier: '00001', manifestation_id: 1 } }
|
298
298
|
expect(assigns(:item)).to_not be_valid
|
299
|
-
expect(response).to
|
299
|
+
expect(response).to be_successful
|
300
300
|
end
|
301
301
|
end
|
302
302
|
|
@@ -96,7 +96,7 @@ describe ManifestationRelationshipTypesController do
|
|
96
96
|
it 'assigns the requested manifestation_relationship_type as @manifestation_relationship_type' do
|
97
97
|
get :new
|
98
98
|
expect(assigns(:manifestation_relationship_type)).not_to be_valid
|
99
|
-
expect(response).to
|
99
|
+
expect(response).to be_successful
|
100
100
|
end
|
101
101
|
end
|
102
102
|
|
@@ -198,7 +198,7 @@ describe ManifestationRelationshipTypesController do
|
|
198
198
|
|
199
199
|
it 'should be successful' do
|
200
200
|
post :create, params: { manifestation_relationship_type: @invalid_attrs }
|
201
|
-
expect(response).to
|
201
|
+
expect(response).to be_successful
|
202
202
|
end
|
203
203
|
end
|
204
204
|
end
|
@@ -47,13 +47,13 @@ describe ManifestationsController do
|
|
47
47
|
|
48
48
|
it 'assigns all manifestations as @manifestations in xml format without operation' do
|
49
49
|
get :index, format: 'xml'
|
50
|
-
expect(response).to
|
50
|
+
expect(response).to be_successful
|
51
51
|
expect(assigns(:manifestations)).to_not be_nil
|
52
52
|
end
|
53
53
|
|
54
54
|
it 'assigns all manifestations as @manifestations in txt format without operation' do
|
55
55
|
get :index, format: 'txt'
|
56
|
-
expect(response).to
|
56
|
+
expect(response).to be_successful
|
57
57
|
expect(assigns(:manifestations)).to_not be_nil
|
58
58
|
expect(response).to render_template('manifestations/index')
|
59
59
|
end
|
@@ -125,58 +125,58 @@ describe ManifestationsController do
|
|
125
125
|
|
126
126
|
it 'should get index with manifestation_id' do
|
127
127
|
get :index, params: { manifestation_id: 1 }
|
128
|
-
expect(response).to
|
128
|
+
expect(response).to be_successful
|
129
129
|
expect(assigns(:manifestation)).to eq Manifestation.find(1)
|
130
130
|
assigns(:manifestations).collect(&:id).should eq assigns(:manifestation).derived_manifestations.collect(&:id)
|
131
131
|
end
|
132
132
|
|
133
133
|
it 'should get index with query' do
|
134
134
|
get :index, params: { query: '2005' }
|
135
|
-
expect(response).to
|
135
|
+
expect(response).to be_successful
|
136
136
|
expect(assigns(:manifestations)).to_not be_blank
|
137
137
|
end
|
138
138
|
|
139
139
|
it 'should get index with page number' do
|
140
140
|
get :index, params: { query: '2005', number_of_pages_at_least: 1, number_of_pages_at_most: 100 }
|
141
|
-
expect(response).to
|
141
|
+
expect(response).to be_successful
|
142
142
|
assigns(:query).should eq '2005 number_of_pages_i:[1 TO 100]'
|
143
143
|
end
|
144
144
|
|
145
145
|
it 'should get index with pub_date_from' do
|
146
146
|
get :index, params: { query: '2005', pub_date_from: '2000' }
|
147
|
-
expect(response).to
|
147
|
+
expect(response).to be_successful
|
148
148
|
expect(assigns(:manifestations)).to be_truthy
|
149
149
|
assigns(:query).should eq '2005 date_of_publication_d:[2000-01-01T00:00:00Z TO *]'
|
150
150
|
end
|
151
151
|
|
152
152
|
it 'should get index with pub_date_until' do
|
153
153
|
get :index, params: { query: '2005', pub_date_until: '2000' }
|
154
|
-
expect(response).to
|
154
|
+
expect(response).to be_successful
|
155
155
|
expect(assigns(:manifestations)).to be_truthy
|
156
156
|
assigns(:query).should eq '2005 date_of_publication_d:[* TO 2000-12-31T23:59:59Z]'
|
157
157
|
end
|
158
158
|
|
159
159
|
it 'should show manifestation with isbn', solr: true do
|
160
160
|
get :index, params: { isbn: '4798002062' }
|
161
|
-
expect(response).to
|
161
|
+
expect(response).to be_successful
|
162
162
|
expect(assigns(:manifestations).count).to eq 1
|
163
163
|
end
|
164
164
|
|
165
165
|
it 'should not show missing manifestation with isbn', solr: true do
|
166
166
|
get :index, params: { isbn: '47980020620' }
|
167
|
-
expect(response).to
|
167
|
+
expect(response).to be_successful
|
168
168
|
expect(assigns(:manifestations)).to be_empty
|
169
169
|
end
|
170
170
|
|
171
171
|
it 'should show manifestation with library 3', solr: true do
|
172
172
|
get :index, params: { library_adv: ['hachioji'] }
|
173
|
-
expect(response).to
|
173
|
+
expect(response).to be_successful
|
174
174
|
expect(assigns(:manifestations).size).to eq 1
|
175
175
|
end
|
176
176
|
|
177
177
|
it 'should show manifestation with library 2 or 3', solr: true do
|
178
178
|
get :index, params: { library_adv: %w(hachioji kamata) }
|
179
|
-
expect(response).to
|
179
|
+
expect(response).to be_successful
|
180
180
|
expect(assigns(:manifestations).size).to eq 2
|
181
181
|
end
|
182
182
|
|
@@ -185,14 +185,14 @@ describe ManifestationsController do
|
|
185
185
|
library = shelf.library
|
186
186
|
item = FactoryBot.create(:item, shelf: shelf)
|
187
187
|
get :index, params: { :"#{library.name}_shelf" => [shelf.name] }
|
188
|
-
expect(response).to
|
188
|
+
expect(response).to be_successful
|
189
189
|
expect(assigns(:manifestations).size).to eq 1
|
190
190
|
expect(assigns(:manifestations).first).to eq item.manifestation
|
191
191
|
end
|
192
192
|
|
193
193
|
it 'should show manifestation with call_number', solr: true do
|
194
194
|
get :index, params: { call_number: '547|ヤ' }
|
195
|
-
expect(response).to
|
195
|
+
expect(response).to be_successful
|
196
196
|
expect(assigns(:manifestations)).not_to be_empty
|
197
197
|
end
|
198
198
|
|
@@ -200,13 +200,13 @@ describe ManifestationsController do
|
|
200
200
|
classification = FactoryBot.create(:classification, category: '007.3', classification_type_id: 1)
|
201
201
|
Manifestation.first.classifications << classification
|
202
202
|
get :index, params: { classification: '007', classification_type: 1 }
|
203
|
-
expect(response).to
|
203
|
+
expect(response).to be_successful
|
204
204
|
expect(assigns(:manifestations)).not_to be_empty
|
205
205
|
end
|
206
206
|
|
207
207
|
it 'should not search with classification if classification is blank' do
|
208
208
|
get :index, params: { classification: '', classification_type: 1 }
|
209
|
-
expect(response).to
|
209
|
+
expect(response).to be_successful
|
210
210
|
expect(assigns(:query)).not_to match /classification/
|
211
211
|
end
|
212
212
|
|
@@ -215,7 +215,7 @@ describe ManifestationsController do
|
|
215
215
|
manifestation = FactoryBot.create(:manifestation)
|
216
216
|
manifestation.subjects << subject
|
217
217
|
get :index, params: { subject_text: 'test_subject' }
|
218
|
-
expect(response).to
|
218
|
+
expect(response).to be_successful
|
219
219
|
expect(assigns(:manifestations)).not_to be_empty
|
220
220
|
expect(assigns(:manifestations).first).to eq manifestation
|
221
221
|
end
|
@@ -293,13 +293,13 @@ describe ManifestationsController do
|
|
293
293
|
it 'should show manifestation with agent who does not produce it' do
|
294
294
|
get :show, params: { id: 3, agent_id: 3 }
|
295
295
|
expect(assigns(:manifestation)).to eq assigns(:agent).manifestations.find(3)
|
296
|
-
expect(response).to
|
296
|
+
expect(response).to be_successful
|
297
297
|
end
|
298
298
|
|
299
299
|
it 'should not show manifestation with required_role of admin' do
|
300
300
|
manifestation = FactoryBot.create(:manifestation, required_role_id: 4)
|
301
301
|
get :show, params: { id: manifestation.id }
|
302
|
-
expect(response).not_to
|
302
|
+
expect(response).not_to be_successful
|
303
303
|
end
|
304
304
|
end
|
305
305
|
|
@@ -318,7 +318,7 @@ describe ManifestationsController do
|
|
318
318
|
|
319
319
|
# it "should show myself" do
|
320
320
|
# get :show, :id => users(:user1).agent
|
321
|
-
# expect(response).to
|
321
|
+
# expect(response).to be_successful
|
322
322
|
# end
|
323
323
|
end
|
324
324
|
|
@@ -342,19 +342,19 @@ describe ManifestationsController do
|
|
342
342
|
|
343
343
|
it 'should show manifestation with holding' do
|
344
344
|
get :show, params: { id: 1, mode: 'holding' }
|
345
|
-
expect(response).to
|
345
|
+
expect(response).to be_successful
|
346
346
|
end
|
347
347
|
|
348
348
|
it 'should show manifestation with show_creators' do
|
349
349
|
get :show, params: { id: 1, mode: 'show_creators' }
|
350
350
|
expect(response).to render_template('manifestations/_show_creators')
|
351
|
-
expect(response).to
|
351
|
+
expect(response).to be_successful
|
352
352
|
end
|
353
353
|
|
354
354
|
it 'should show manifestation with show_all_creators' do
|
355
355
|
get :show, params: { id: 1, mode: 'show_all_creators' }
|
356
356
|
expect(response).to render_template('manifestations/_show_creators')
|
357
|
-
expect(response).to
|
357
|
+
expect(response).to be_successful
|
358
358
|
end
|
359
359
|
|
360
360
|
it "should not send manifestation's detail email" do
|
@@ -375,12 +375,12 @@ describe ManifestationsController do
|
|
375
375
|
|
376
376
|
it 'should get new template without expression_id' do
|
377
377
|
get :new
|
378
|
-
expect(response).to
|
378
|
+
expect(response).to be_successful
|
379
379
|
end
|
380
380
|
|
381
381
|
it 'should get new template with expression_id' do
|
382
382
|
get :new, params: { expression_id: 1 }
|
383
|
-
expect(response).to
|
383
|
+
expect(response).to be_successful
|
384
384
|
end
|
385
385
|
end
|
386
386
|
|
@@ -394,12 +394,12 @@ describe ManifestationsController do
|
|
394
394
|
|
395
395
|
it 'should get new template without expression_id' do
|
396
396
|
get :new
|
397
|
-
expect(response).to
|
397
|
+
expect(response).to be_successful
|
398
398
|
end
|
399
399
|
|
400
400
|
it 'should get new template with expression_id' do
|
401
401
|
get :new, params: { expression_id: 1 }
|
402
|
-
expect(response).to
|
402
|
+
expect(response).to be_successful
|
403
403
|
end
|
404
404
|
|
405
405
|
it 'should get new template with parent_id' do
|
@@ -423,7 +423,7 @@ describe ManifestationsController do
|
|
423
423
|
serial.classifications << FactoryBot.create(:classification)
|
424
424
|
serial.save!
|
425
425
|
get :new, params: { parent_id: serial.id }
|
426
|
-
expect(response).to
|
426
|
+
expect(response).to be_successful
|
427
427
|
manifestation = assigns(:manifestation)
|
428
428
|
parent = assigns(:parent)
|
429
429
|
expect(parent).to be_truthy
|