enju_biblio 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/picture_files_controller.rb +1 -1
  3. data/app/models/item.rb +1 -1
  4. data/app/models/manifestation.rb +22 -2
  5. data/app/models/resource_import_file.rb +4 -4
  6. data/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +5 -0
  7. data/lib/enju_biblio/version.rb +1 -1
  8. data/spec/cassette_library/ImportRequest/import/should_import_bibliographic_record.yml +38 -655
  9. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/should_import_without_errors.yml +43 -191
  10. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_isbn_which_is_already_imported/redirects_to_the_created_import_request.yml +40 -592
  11. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +37 -589
  12. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Administrator/with_valid_params/redirects_to_the_created_import_request.yml +41 -593
  13. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/assigns_a_newly_created_import_request_as_import_request.yml +39 -591
  14. data/spec/cassette_library/ImportRequestsController/POST_create/When_logged_in_as_Librarian/with_valid_params/redirects_to_the_created_import_request.yml +39 -591
  15. data/spec/cassette_library/ResourceImportFile/should_import_in_background.yml +40 -425
  16. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/ISBN_import/with_record_not_found/should_record_an_error_message.yml +39 -75
  17. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_has_only_isbn/should_be_imported.yml +39 -705
  18. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_shift_jis/should_be_imported.yml +39 -424
  19. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_be_imported.yml +37 -422
  20. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_be_searchable_right_after_the_import.yml +41 -426
  21. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_send_message_when_import_is_completed.yml +39 -424
  22. data/spec/controllers/agent_merge_lists_controller_spec.rb +9 -9
  23. data/spec/controllers/agent_merges_controller_spec.rb +13 -13
  24. data/spec/controllers/agent_relationship_types_controller_spec.rb +12 -12
  25. data/spec/controllers/agent_relationships_controller_spec.rb +12 -12
  26. data/spec/controllers/agent_types_controller_spec.rb +1 -1
  27. data/spec/controllers/agents_controller_spec.rb +6 -6
  28. data/spec/controllers/carrier_types_controller_spec.rb +1 -1
  29. data/spec/controllers/content_types_controller_spec.rb +3 -3
  30. data/spec/controllers/countries_controller_spec.rb +9 -9
  31. data/spec/controllers/create_types_controller_spec.rb +1 -1
  32. data/spec/controllers/creates_controller_spec.rb +11 -11
  33. data/spec/controllers/donates_controller_spec.rb +11 -11
  34. data/spec/controllers/form_of_works_controller_spec.rb +1 -1
  35. data/spec/controllers/frequencies_controller_spec.rb +3 -3
  36. data/spec/controllers/identifier_types_controller_spec.rb +1 -1
  37. data/spec/controllers/import_requests_controller_spec.rb +5 -5
  38. data/spec/controllers/items_controller_spec.rb +15 -15
  39. data/spec/controllers/languages_controller_spec.rb +6 -6
  40. data/spec/controllers/licenses_controller_spec.rb +1 -1
  41. data/spec/controllers/manifestation_relationship_types_controller_spec.rb +12 -12
  42. data/spec/controllers/manifestation_relationships_controller_spec.rb +12 -12
  43. data/spec/controllers/manifestations_controller_spec.rb +29 -29
  44. data/spec/controllers/medium_of_performances_controller_spec.rb +1 -1
  45. data/spec/controllers/owns_controller_spec.rb +12 -12
  46. data/spec/controllers/produce_types_controller_spec.rb +1 -1
  47. data/spec/controllers/produces_controller_spec.rb +10 -10
  48. data/spec/controllers/realize_types_controller_spec.rb +1 -1
  49. data/spec/controllers/realizes_controller_spec.rb +11 -11
  50. data/spec/controllers/series_statement_merge_lists_controller_spec.rb +12 -12
  51. data/spec/controllers/series_statement_merges_controller_spec.rb +12 -12
  52. data/spec/controllers/series_statements_controller_spec.rb +11 -11
  53. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +5 -0
  54. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +5 -0
  55. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +5 -0
  56. data/spec/dummy/db/schema.rb +7 -3
  57. data/spec/factories/agent.rb +2 -2
  58. data/spec/factories/agent_merge.rb +3 -3
  59. data/spec/factories/agent_merge_list.rb +1 -1
  60. data/spec/factories/basket.rb +2 -2
  61. data/spec/factories/carrier_type.rb +1 -1
  62. data/spec/factories/checkout.rb +1 -1
  63. data/spec/factories/classification.rb +2 -2
  64. data/spec/factories/classification_type.rb +1 -1
  65. data/spec/factories/content_type.rb +1 -1
  66. data/spec/factories/country.rb +1 -1
  67. data/spec/factories/create.rb +3 -3
  68. data/spec/factories/create_types.rb +1 -1
  69. data/spec/factories/donate.rb +3 -3
  70. data/spec/factories/form_of_work.rb +1 -1
  71. data/spec/factories/frequency.rb +1 -1
  72. data/spec/factories/identifier.rb +2 -2
  73. data/spec/factories/identifier_type.rb +1 -1
  74. data/spec/factories/import_request.rb +1 -1
  75. data/spec/factories/item.rb +2 -2
  76. data/spec/factories/language.rb +1 -1
  77. data/spec/factories/library.rb +2 -2
  78. data/spec/factories/license.rb +1 -1
  79. data/spec/factories/manifestation.rb +2 -2
  80. data/spec/factories/manifestation_relationship.rb +3 -3
  81. data/spec/factories/manifestation_relationship_type.rb +1 -1
  82. data/spec/factories/medium_of_performance.rb +1 -1
  83. data/spec/factories/own.rb +3 -3
  84. data/spec/factories/patron_relationship.rb +3 -3
  85. data/spec/factories/patron_relationship_type.rb +1 -1
  86. data/spec/factories/patron_type.rb +1 -1
  87. data/spec/factories/produce.rb +3 -3
  88. data/spec/factories/produce_types.rb +1 -1
  89. data/spec/factories/profile.rb +2 -2
  90. data/spec/factories/realize.rb +3 -3
  91. data/spec/factories/realize_types.rb +1 -1
  92. data/spec/factories/reserve.rb +5 -5
  93. data/spec/factories/role.rb +1 -1
  94. data/spec/factories/series_has_manifestation.rb +3 -3
  95. data/spec/factories/series_statement.rb +2 -2
  96. data/spec/factories/series_statement_merge.rb +3 -3
  97. data/spec/factories/series_statement_merge_list.rb +1 -1
  98. data/spec/factories/series_statement_relationship.rb +3 -3
  99. data/spec/factories/shelf.rb +2 -2
  100. data/spec/factories/subject.rb +3 -3
  101. data/spec/factories/subject_heading_type.rb +1 -1
  102. data/spec/factories/subject_heading_type_has_subject.rb +3 -3
  103. data/spec/factories/subject_type.rb +1 -1
  104. data/spec/factories/user.rb +1 -1
  105. data/spec/fixtures/items.yml +1 -1
  106. data/spec/fixtures/library_groups.yml +1 -1
  107. data/spec/models/agent_spec.rb +4 -4
  108. data/spec/models/create_type_spec.rb +1 -1
  109. data/spec/models/item_spec.rb +1 -1
  110. data/spec/models/manifestation_spec.rb +30 -6
  111. data/spec/models/produce_type_spec.rb +1 -1
  112. data/spec/models/realize_type_spec.rb +1 -1
  113. data/spec/models/resource_export_file_spec.rb +7 -7
  114. data/spec/models/resource_import_file_spec.rb +19 -0
  115. data/spec/models/series_statement_spec.rb +1 -1
  116. data/spec/policies/manifestation_policy_spec.rb +5 -5
  117. data/spec/rails_helper.rb +3 -3
  118. data/spec/support/controller_macros.rb +3 -3
  119. data/spec/views/items/index.html.erb_spec.rb +2 -2
  120. data/spec/views/manifestations/index.html.erb_spec.rb +1 -1
  121. data/spec/views/manifestations/index.rdf.builder_spec.rb +1 -1
  122. data/spec/views/manifestations/index.txt.erb_spec.rb +2 -2
  123. data/spec/views/manifestations/show.html.erb_spec.rb +5 -5
  124. data/spec/views/manifestations/show.txt.erb_spec.rb +1 -1
  125. data/spec/views/series_statement_merges/show.html.erb_spec.rb +1 -1
  126. metadata +23 -16
@@ -5,7 +5,7 @@ describe AgentMergesController do
5
5
 
6
6
  describe 'GET index' do
7
7
  before(:each) do
8
- FactoryGirl.create(:agent_merge)
8
+ FactoryBot.create(:agent_merge)
9
9
  end
10
10
 
11
11
  describe 'When logged in as Administrator' do
@@ -50,7 +50,7 @@ describe AgentMergesController do
50
50
  login_admin
51
51
 
52
52
  it 'assigns the requested agent_merge as @agent_merge' do
53
- agent_merge = FactoryGirl.create(:agent_merge)
53
+ agent_merge = FactoryBot.create(:agent_merge)
54
54
  get :show, id: agent_merge.id
55
55
  assigns(:agent_merge).should eq(agent_merge)
56
56
  end
@@ -60,7 +60,7 @@ describe AgentMergesController do
60
60
  login_librarian
61
61
 
62
62
  it 'assigns the requested agent_merge as @agent_merge' do
63
- agent_merge = FactoryGirl.create(:agent_merge)
63
+ agent_merge = FactoryBot.create(:agent_merge)
64
64
  get :show, id: agent_merge.id
65
65
  assigns(:agent_merge).should eq(agent_merge)
66
66
  end
@@ -70,7 +70,7 @@ describe AgentMergesController do
70
70
  login_user
71
71
 
72
72
  it 'assigns the requested agent_merge as @agent_merge' do
73
- agent_merge = FactoryGirl.create(:agent_merge)
73
+ agent_merge = FactoryBot.create(:agent_merge)
74
74
  get :show, id: agent_merge.id
75
75
  assigns(:agent_merge).should eq(agent_merge)
76
76
  end
@@ -78,7 +78,7 @@ describe AgentMergesController do
78
78
 
79
79
  describe 'When not logged in' do
80
80
  it 'assigns the requested agent_merge as @agent_merge' do
81
- agent_merge = FactoryGirl.create(:agent_merge)
81
+ agent_merge = FactoryBot.create(:agent_merge)
82
82
  get :show, id: agent_merge.id
83
83
  assigns(:agent_merge).should eq(agent_merge)
84
84
  end
@@ -130,7 +130,7 @@ describe AgentMergesController do
130
130
  login_admin
131
131
 
132
132
  it 'assigns the requested agent_merge as @agent_merge' do
133
- agent_merge = FactoryGirl.create(:agent_merge)
133
+ agent_merge = FactoryBot.create(:agent_merge)
134
134
  get :edit, id: agent_merge.id
135
135
  assigns(:agent_merge).should eq(agent_merge)
136
136
  end
@@ -140,7 +140,7 @@ describe AgentMergesController do
140
140
  login_librarian
141
141
 
142
142
  it 'assigns the requested agent_merge as @agent_merge' do
143
- agent_merge = FactoryGirl.create(:agent_merge)
143
+ agent_merge = FactoryBot.create(:agent_merge)
144
144
  get :edit, id: agent_merge.id
145
145
  assigns(:agent_merge).should eq(agent_merge)
146
146
  end
@@ -150,7 +150,7 @@ describe AgentMergesController do
150
150
  login_user
151
151
 
152
152
  it 'assigns the requested agent_merge as @agent_merge' do
153
- agent_merge = FactoryGirl.create(:agent_merge)
153
+ agent_merge = FactoryBot.create(:agent_merge)
154
154
  get :edit, id: agent_merge.id
155
155
  response.should be_forbidden
156
156
  end
@@ -158,7 +158,7 @@ describe AgentMergesController do
158
158
 
159
159
  describe 'When not logged in' do
160
160
  it 'should not assign the requested agent_merge as @agent_merge' do
161
- agent_merge = FactoryGirl.create(:agent_merge)
161
+ agent_merge = FactoryBot.create(:agent_merge)
162
162
  get :edit, id: agent_merge.id
163
163
  response.should redirect_to(new_user_session_url)
164
164
  end
@@ -167,7 +167,7 @@ describe AgentMergesController do
167
167
 
168
168
  describe 'POST create' do
169
169
  before(:each) do
170
- @attrs = FactoryGirl.attributes_for(:agent_merge)
170
+ @attrs = FactoryBot.attributes_for(:agent_merge)
171
171
  @invalid_attrs = { agent_id: 'invalid', agent_merge_list_id: 'invalid' }
172
172
  end
173
173
 
@@ -284,8 +284,8 @@ describe AgentMergesController do
284
284
 
285
285
  describe 'PUT update' do
286
286
  before(:each) do
287
- @agent_merge = FactoryGirl.create(:agent_merge)
288
- @attrs = FactoryGirl.attributes_for(:agent_merge)
287
+ @agent_merge = FactoryBot.create(:agent_merge)
288
+ @attrs = FactoryBot.attributes_for(:agent_merge)
289
289
  @invalid_attrs = { agent_merge_list_id: '' }
290
290
  end
291
291
 
@@ -381,7 +381,7 @@ describe AgentMergesController do
381
381
 
382
382
  describe 'DELETE destroy' do
383
383
  before(:each) do
384
- @agent_merge = FactoryGirl.create(:agent_merge)
384
+ @agent_merge = FactoryBot.create(:agent_merge)
385
385
  end
386
386
 
387
387
  describe 'When logged in as Administrator' do
@@ -6,12 +6,12 @@ describe AgentRelationshipTypesController do
6
6
  disconnect_sunspot
7
7
 
8
8
  def valid_attributes
9
- FactoryGirl.attributes_for(:agent_relationship_type)
9
+ FactoryBot.attributes_for(:agent_relationship_type)
10
10
  end
11
11
 
12
12
  describe 'GET index' do
13
13
  before(:each) do
14
- FactoryGirl.create(:agent_relationship_type)
14
+ FactoryBot.create(:agent_relationship_type)
15
15
  end
16
16
 
17
17
  describe 'When logged in as Administrator' do
@@ -54,7 +54,7 @@ describe AgentRelationshipTypesController do
54
54
  login_fixture_admin
55
55
 
56
56
  it 'assigns the requested agent_relationship_type as @agent_relationship_type' do
57
- agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
57
+ agent_relationship_type = FactoryBot.create(:agent_relationship_type)
58
58
  get :show, id: agent_relationship_type.id
59
59
  expect(assigns(:agent_relationship_type)).to eq(agent_relationship_type)
60
60
  end
@@ -64,7 +64,7 @@ describe AgentRelationshipTypesController do
64
64
  login_fixture_librarian
65
65
 
66
66
  it 'assigns the requested agent_relationship_type as @agent_relationship_type' do
67
- agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
67
+ agent_relationship_type = FactoryBot.create(:agent_relationship_type)
68
68
  get :show, id: agent_relationship_type.id
69
69
  expect(assigns(:agent_relationship_type)).to eq(agent_relationship_type)
70
70
  end
@@ -74,7 +74,7 @@ describe AgentRelationshipTypesController do
74
74
  login_fixture_user
75
75
 
76
76
  it 'assigns the requested agent_relationship_type as @agent_relationship_type' do
77
- agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
77
+ agent_relationship_type = FactoryBot.create(:agent_relationship_type)
78
78
  get :show, id: agent_relationship_type.id
79
79
  expect(assigns(:agent_relationship_type)).to eq(agent_relationship_type)
80
80
  end
@@ -82,7 +82,7 @@ describe AgentRelationshipTypesController do
82
82
 
83
83
  describe 'When not logged in' do
84
84
  it 'assigns the requested agent_relationship_type as @agent_relationship_type' do
85
- agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
85
+ agent_relationship_type = FactoryBot.create(:agent_relationship_type)
86
86
  get :show, id: agent_relationship_type.id
87
87
  expect(assigns(:agent_relationship_type)).to eq(agent_relationship_type)
88
88
  end
@@ -134,7 +134,7 @@ describe AgentRelationshipTypesController do
134
134
  login_fixture_admin
135
135
 
136
136
  it 'assigns the requested agent_relationship_type as @agent_relationship_type' do
137
- agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
137
+ agent_relationship_type = FactoryBot.create(:agent_relationship_type)
138
138
  get :edit, id: agent_relationship_type.id
139
139
  expect(assigns(:agent_relationship_type)).to eq(agent_relationship_type)
140
140
  end
@@ -144,7 +144,7 @@ describe AgentRelationshipTypesController do
144
144
  login_fixture_librarian
145
145
 
146
146
  it 'assigns the requested agent_relationship_type as @agent_relationship_type' do
147
- agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
147
+ agent_relationship_type = FactoryBot.create(:agent_relationship_type)
148
148
  get :edit, id: agent_relationship_type.id
149
149
  expect(response).to be_forbidden
150
150
  end
@@ -154,7 +154,7 @@ describe AgentRelationshipTypesController do
154
154
  login_fixture_user
155
155
 
156
156
  it 'assigns the requested agent_relationship_type as @agent_relationship_type' do
157
- agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
157
+ agent_relationship_type = FactoryBot.create(:agent_relationship_type)
158
158
  get :edit, id: agent_relationship_type.id
159
159
  expect(response).to be_forbidden
160
160
  end
@@ -162,7 +162,7 @@ describe AgentRelationshipTypesController do
162
162
 
163
163
  describe 'When not logged in' do
164
164
  it 'should not assign the requested agent_relationship_type as @agent_relationship_type' do
165
- agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
165
+ agent_relationship_type = FactoryBot.create(:agent_relationship_type)
166
166
  get :edit, id: agent_relationship_type.id
167
167
  expect(response).to redirect_to(new_user_session_url)
168
168
  end
@@ -288,7 +288,7 @@ describe AgentRelationshipTypesController do
288
288
 
289
289
  describe 'PUT update' do
290
290
  before(:each) do
291
- @agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
291
+ @agent_relationship_type = FactoryBot.create(:agent_relationship_type)
292
292
  @attrs = valid_attributes
293
293
  @invalid_attrs = { name: '' }
294
294
  end
@@ -389,7 +389,7 @@ describe AgentRelationshipTypesController do
389
389
 
390
390
  describe 'DELETE destroy' do
391
391
  before(:each) do
392
- @agent_relationship_type = FactoryGirl.create(:agent_relationship_type)
392
+ @agent_relationship_type = FactoryBot.create(:agent_relationship_type)
393
393
  end
394
394
 
395
395
  describe 'When logged in as Administrator' do
@@ -6,12 +6,12 @@ describe AgentRelationshipsController do
6
6
  disconnect_sunspot
7
7
 
8
8
  def valid_attributes
9
- @attrs = FactoryGirl.attributes_for(:agent_relationship)
9
+ @attrs = FactoryBot.attributes_for(:agent_relationship)
10
10
  end
11
11
 
12
12
  describe 'GET index' do
13
13
  before(:each) do
14
- FactoryGirl.create(:agent_relationship)
14
+ FactoryBot.create(:agent_relationship)
15
15
  end
16
16
 
17
17
  describe 'When logged in as Administrator' do
@@ -54,7 +54,7 @@ describe AgentRelationshipsController do
54
54
  login_fixture_admin
55
55
 
56
56
  it 'assigns the requested agent_relationship as @agent_relationship' do
57
- agent_relationship = FactoryGirl.create(:agent_relationship)
57
+ agent_relationship = FactoryBot.create(:agent_relationship)
58
58
  get :show, id: agent_relationship.id
59
59
  expect(assigns(:agent_relationship)).to eq(agent_relationship)
60
60
  end
@@ -64,7 +64,7 @@ describe AgentRelationshipsController do
64
64
  login_fixture_librarian
65
65
 
66
66
  it 'assigns the requested agent_relationship as @agent_relationship' do
67
- agent_relationship = FactoryGirl.create(:agent_relationship)
67
+ agent_relationship = FactoryBot.create(:agent_relationship)
68
68
  get :show, id: agent_relationship.id
69
69
  expect(assigns(:agent_relationship)).to eq(agent_relationship)
70
70
  end
@@ -74,7 +74,7 @@ describe AgentRelationshipsController do
74
74
  login_fixture_user
75
75
 
76
76
  it 'assigns the requested agent_relationship as @agent_relationship' do
77
- agent_relationship = FactoryGirl.create(:agent_relationship)
77
+ agent_relationship = FactoryBot.create(:agent_relationship)
78
78
  get :show, id: agent_relationship.id
79
79
  expect(assigns(:agent_relationship)).to eq(agent_relationship)
80
80
  end
@@ -82,7 +82,7 @@ describe AgentRelationshipsController do
82
82
 
83
83
  describe 'When not logged in' do
84
84
  it 'assigns the requested agent_relationship as @agent_relationship' do
85
- agent_relationship = FactoryGirl.create(:agent_relationship)
85
+ agent_relationship = FactoryBot.create(:agent_relationship)
86
86
  get :show, id: agent_relationship.id
87
87
  expect(assigns(:agent_relationship)).to eq(agent_relationship)
88
88
  end
@@ -134,7 +134,7 @@ describe AgentRelationshipsController do
134
134
  login_fixture_admin
135
135
 
136
136
  it 'assigns the requested agent_relationship as @agent_relationship' do
137
- agent_relationship = FactoryGirl.create(:agent_relationship)
137
+ agent_relationship = FactoryBot.create(:agent_relationship)
138
138
  get :edit, id: agent_relationship.id
139
139
  expect(assigns(:agent_relationship)).to eq(agent_relationship)
140
140
  end
@@ -144,7 +144,7 @@ describe AgentRelationshipsController do
144
144
  login_fixture_librarian
145
145
 
146
146
  it 'assigns the requested agent_relationship as @agent_relationship' do
147
- agent_relationship = FactoryGirl.create(:agent_relationship)
147
+ agent_relationship = FactoryBot.create(:agent_relationship)
148
148
  get :edit, id: agent_relationship.id
149
149
  expect(assigns(:agent_relationship)).to eq(agent_relationship)
150
150
  end
@@ -154,7 +154,7 @@ describe AgentRelationshipsController do
154
154
  login_fixture_user
155
155
 
156
156
  it 'assigns the requested agent_relationship as @agent_relationship' do
157
- agent_relationship = FactoryGirl.create(:agent_relationship)
157
+ agent_relationship = FactoryBot.create(:agent_relationship)
158
158
  get :edit, id: agent_relationship.id
159
159
  expect(response).to be_forbidden
160
160
  end
@@ -162,7 +162,7 @@ describe AgentRelationshipsController do
162
162
 
163
163
  describe 'When not logged in' do
164
164
  it 'should not assign the requested agent_relationship as @agent_relationship' do
165
- agent_relationship = FactoryGirl.create(:agent_relationship)
165
+ agent_relationship = FactoryBot.create(:agent_relationship)
166
166
  get :edit, id: agent_relationship.id
167
167
  expect(response).to redirect_to(new_user_session_url)
168
168
  end
@@ -288,7 +288,7 @@ describe AgentRelationshipsController do
288
288
 
289
289
  describe 'PUT update' do
290
290
  before(:each) do
291
- @agent_relationship = FactoryGirl.create(:agent_relationship)
291
+ @agent_relationship = FactoryBot.create(:agent_relationship)
292
292
  @attrs = valid_attributes
293
293
  @invalid_attrs = { parent_id: '' }
294
294
  end
@@ -390,7 +390,7 @@ describe AgentRelationshipsController do
390
390
 
391
391
  describe 'DELETE destroy' do
392
392
  before(:each) do
393
- @agent_relationship = FactoryGirl.create(:agent_relationship)
393
+ @agent_relationship = FactoryBot.create(:agent_relationship)
394
394
  end
395
395
 
396
396
  describe 'When logged in as Administrator' do
@@ -26,7 +26,7 @@ describe AgentTypesController do
26
26
  # AgentType. As you add validations to AgentType, be sure to
27
27
  # update the return value of this method accordingly.
28
28
  def valid_attributes
29
- FactoryGirl.attributes_for(:agent_type)
29
+ FactoryBot.attributes_for(:agent_type)
30
30
  end
31
31
 
32
32
  describe 'GET index' do
@@ -4,7 +4,7 @@ describe AgentsController do
4
4
  fixtures :all
5
5
 
6
6
  def valid_attributes
7
- FactoryGirl.attributes_for(:agent)
7
+ FactoryBot.attributes_for(:agent)
8
8
  end
9
9
 
10
10
  describe 'GET index', solr: true do
@@ -91,7 +91,7 @@ describe AgentsController do
91
91
 
92
92
  describe 'GET show' do
93
93
  before(:each) do
94
- @agent = FactoryGirl.create(:agent)
94
+ @agent = FactoryBot.create(:agent)
95
95
  end
96
96
 
97
97
  describe 'When logged in as Administrator' do
@@ -294,7 +294,7 @@ describe AgentsController do
294
294
  describe 'POST create' do
295
295
  before(:each) do
296
296
  @attrs = valid_attributes
297
- @invalid_attrs = FactoryGirl.attributes_for(:agent, full_name: '')
297
+ @invalid_attrs = FactoryBot.attributes_for(:agent, full_name: '')
298
298
  end
299
299
 
300
300
  describe 'When logged in as Administrator' do
@@ -445,9 +445,9 @@ describe AgentsController do
445
445
 
446
446
  describe 'PUT update' do
447
447
  before(:each) do
448
- @agent = FactoryGirl.create(:agent)
448
+ @agent = FactoryBot.create(:agent)
449
449
  @attrs = valid_attributes
450
- @invalid_attrs = FactoryGirl.attributes_for(:agent, full_name: '')
450
+ @invalid_attrs = FactoryBot.attributes_for(:agent, full_name: '')
451
451
  end
452
452
 
453
453
  describe 'When logged in as Administrator' do
@@ -568,7 +568,7 @@ describe AgentsController do
568
568
 
569
569
  describe 'DELETE destroy' do
570
570
  before(:each) do
571
- @agent = FactoryGirl.create(:agent)
571
+ @agent = FactoryBot.create(:agent)
572
572
  end
573
573
 
574
574
  describe 'When logged in as Administrator' do
@@ -25,7 +25,7 @@ describe CarrierTypesController do
25
25
  # CarrierType. As you add validations to CarrierType, be sure to
26
26
  # update the return value of this method accordingly.
27
27
  def valid_attributes
28
- FactoryGirl.attributes_for(:carrier_type)
28
+ FactoryBot.attributes_for(:carrier_type)
29
29
  end
30
30
 
31
31
  context 'When logged in as Administrator' do
@@ -26,7 +26,7 @@ describe ContentTypesController do
26
26
  # ContentType. As you add validations to ContentType, be sure to
27
27
  # update the return value of this method accordingly.
28
28
  def valid_attributes
29
- FactoryGirl.attributes_for(:content_type)
29
+ FactoryBot.attributes_for(:content_type)
30
30
  end
31
31
 
32
32
  describe 'GET index' do
@@ -59,8 +59,8 @@ describe ContentTypesController do
59
59
  expect(assigns(:content_type)).to eq(content_type)
60
60
  end
61
61
  it 'assigns the content_type even if it associates manifestation(s)' do
62
- content_type = FactoryGirl.create(:content_type)
63
- manifestation = FactoryGirl.create(:manifestation, content_type_id: content_type.id)
62
+ content_type = FactoryBot.create(:content_type)
63
+ manifestation = FactoryBot.create(:manifestation, content_type_id: content_type.id)
64
64
  get :edit, id: content_type.id
65
65
  expect(assigns(:content_type)).to eq content_type
66
66
  expect(response).to be_success
@@ -6,12 +6,12 @@ describe CountriesController do
6
6
  disconnect_sunspot
7
7
 
8
8
  def valid_attributes
9
- FactoryGirl.attributes_for(:country)
9
+ FactoryBot.attributes_for(:country)
10
10
  end
11
11
 
12
12
  describe 'GET index' do
13
13
  before(:each) do
14
- FactoryGirl.create(:country)
14
+ FactoryBot.create(:country)
15
15
  end
16
16
 
17
17
  describe 'When logged in as Administrator' do
@@ -51,7 +51,7 @@ describe CountriesController do
51
51
 
52
52
  describe 'GET show' do
53
53
  before(:each) do
54
- @country = FactoryGirl.create(:country)
54
+ @country = FactoryBot.create(:country)
55
55
  end
56
56
 
57
57
  describe 'When logged in as Administrator' do
@@ -134,7 +134,7 @@ describe CountriesController do
134
134
  login_fixture_admin
135
135
 
136
136
  it 'assigns the requested country as @country' do
137
- country = FactoryGirl.create(:country)
137
+ country = FactoryBot.create(:country)
138
138
  get :edit, id: country.id
139
139
  assigns(:country).should eq(country)
140
140
  end
@@ -144,7 +144,7 @@ describe CountriesController do
144
144
  login_fixture_librarian
145
145
 
146
146
  it 'assigns the requested country as @country' do
147
- country = FactoryGirl.create(:country)
147
+ country = FactoryBot.create(:country)
148
148
  get :edit, id: country.id
149
149
  assigns(:country).should eq(country)
150
150
  end
@@ -154,7 +154,7 @@ describe CountriesController do
154
154
  login_fixture_user
155
155
 
156
156
  it 'assigns the requested country as @country' do
157
- country = FactoryGirl.create(:country)
157
+ country = FactoryBot.create(:country)
158
158
  get :edit, id: country.id
159
159
  assigns(:country).should eq(country)
160
160
  end
@@ -162,7 +162,7 @@ describe CountriesController do
162
162
 
163
163
  describe 'When not logged in' do
164
164
  it 'should not assign the requested country as @country' do
165
- country = FactoryGirl.create(:country)
165
+ country = FactoryBot.create(:country)
166
166
  get :edit, id: country.id
167
167
  expect(response).to redirect_to(new_user_session_url)
168
168
  end
@@ -288,7 +288,7 @@ describe CountriesController do
288
288
 
289
289
  describe 'PUT update' do
290
290
  before(:each) do
291
- @country = FactoryGirl.create(:country)
291
+ @country = FactoryBot.create(:country)
292
292
  @attrs = valid_attributes
293
293
  @invalid_attrs = { name: '' }
294
294
  end
@@ -397,7 +397,7 @@ describe CountriesController do
397
397
 
398
398
  describe 'DELETE destroy' do
399
399
  before(:each) do
400
- @country = FactoryGirl.create(:country)
400
+ @country = FactoryBot.create(:country)
401
401
  end
402
402
 
403
403
  describe 'When logged in as Administrator' do
@@ -26,7 +26,7 @@ describe CreateTypesController do
26
26
  # CreateType. As you add validations to CreateType, be sure to
27
27
  # update the return value of this method accordingly.
28
28
  def valid_attributes
29
- FactoryGirl.attributes_for(:create_type)
29
+ FactoryBot.attributes_for(:create_type)
30
30
  end
31
31
 
32
32
  describe 'GET index' do
@@ -6,12 +6,12 @@ describe CreatesController do
6
6
  disconnect_sunspot
7
7
 
8
8
  def valid_attributes
9
- FactoryGirl.attributes_for(:create)
9
+ FactoryBot.attributes_for(:create)
10
10
  end
11
11
 
12
12
  describe 'GET index' do
13
13
  before(:each) do
14
- FactoryGirl.create(:create)
14
+ FactoryBot.create(:create)
15
15
  end
16
16
 
17
17
  describe 'When logged in as Administrator' do
@@ -54,7 +54,7 @@ describe CreatesController do
54
54
  login_fixture_admin
55
55
 
56
56
  it 'assigns the requested create as @create' do
57
- create = FactoryGirl.create(:create)
57
+ create = FactoryBot.create(:create)
58
58
  get :show, id: create.id
59
59
  expect(assigns(:create)).to eq(create)
60
60
  end
@@ -64,7 +64,7 @@ describe CreatesController do
64
64
  login_fixture_librarian
65
65
 
66
66
  it 'assigns the requested create as @create' do
67
- create = FactoryGirl.create(:create)
67
+ create = FactoryBot.create(:create)
68
68
  get :show, id: create.id
69
69
  expect(assigns(:create)).to eq(create)
70
70
  end
@@ -74,7 +74,7 @@ describe CreatesController do
74
74
  login_fixture_user
75
75
 
76
76
  it 'assigns the requested create as @create' do
77
- create = FactoryGirl.create(:create)
77
+ create = FactoryBot.create(:create)
78
78
  get :show, id: create.id
79
79
  expect(assigns(:create)).to eq(create)
80
80
  end
@@ -82,7 +82,7 @@ describe CreatesController do
82
82
 
83
83
  describe 'When not logged in' do
84
84
  it 'assigns the requested create as @create' do
85
- create = FactoryGirl.create(:create)
85
+ create = FactoryBot.create(:create)
86
86
  get :show, id: create.id
87
87
  expect(assigns(:create)).to eq(create)
88
88
  end
@@ -132,7 +132,7 @@ describe CreatesController do
132
132
  login_fixture_admin
133
133
 
134
134
  it 'assigns the requested create as @create' do
135
- create = FactoryGirl.create(:create)
135
+ create = FactoryBot.create(:create)
136
136
  get :edit, id: create.id
137
137
  expect(assigns(:create)).to eq(create)
138
138
  end
@@ -142,7 +142,7 @@ describe CreatesController do
142
142
  login_fixture_librarian
143
143
 
144
144
  it 'assigns the requested create as @create' do
145
- create = FactoryGirl.create(:create)
145
+ create = FactoryBot.create(:create)
146
146
  get :edit, id: create.id
147
147
  expect(assigns(:create)).to eq(create)
148
148
  end
@@ -152,7 +152,7 @@ describe CreatesController do
152
152
  login_fixture_user
153
153
 
154
154
  it 'assigns the requested create as @create' do
155
- create = FactoryGirl.create(:create)
155
+ create = FactoryBot.create(:create)
156
156
  get :edit, id: create.id
157
157
  expect(response).to be_forbidden
158
158
  end
@@ -160,7 +160,7 @@ describe CreatesController do
160
160
 
161
161
  describe 'When not logged in' do
162
162
  it 'should not assign the requested create as @create' do
163
- create = FactoryGirl.create(:create)
163
+ create = FactoryBot.create(:create)
164
164
  get :edit, id: create.id
165
165
  expect(response).to redirect_to(new_user_session_url)
166
166
  end
@@ -394,7 +394,7 @@ describe CreatesController do
394
394
 
395
395
  describe 'DELETE destroy' do
396
396
  before(:each) do
397
- @create = FactoryGirl.create(:create)
397
+ @create = FactoryBot.create(:create)
398
398
  end
399
399
 
400
400
  describe 'When logged in as Administrator' do
@@ -6,7 +6,7 @@ describe DonatesController do
6
6
  disconnect_sunspot
7
7
 
8
8
  def valid_attributes
9
- FactoryGirl.attributes_for(:donate)
9
+ FactoryBot.attributes_for(:donate)
10
10
  end
11
11
 
12
12
  describe 'GET index' do
@@ -50,7 +50,7 @@ describe DonatesController do
50
50
  login_fixture_admin
51
51
 
52
52
  it 'assigns the requested donate as @donate' do
53
- donate = FactoryGirl.create(:donate)
53
+ donate = FactoryBot.create(:donate)
54
54
  get :show, id: donate.id
55
55
  expect(assigns(:donate)).to eq(donate)
56
56
  end
@@ -60,7 +60,7 @@ describe DonatesController do
60
60
  login_fixture_librarian
61
61
 
62
62
  it 'assigns the requested donate as @donate' do
63
- donate = FactoryGirl.create(:donate)
63
+ donate = FactoryBot.create(:donate)
64
64
  get :show, id: donate.id
65
65
  expect(assigns(:donate)).to eq(donate)
66
66
  end
@@ -70,7 +70,7 @@ describe DonatesController do
70
70
  login_fixture_user
71
71
 
72
72
  it 'assigns the requested donate as @donate' do
73
- donate = FactoryGirl.create(:donate)
73
+ donate = FactoryBot.create(:donate)
74
74
  get :show, id: donate.id
75
75
  expect(assigns(:donate)).to eq(donate)
76
76
  end
@@ -78,7 +78,7 @@ describe DonatesController do
78
78
 
79
79
  describe 'When not logged in' do
80
80
  it 'assigns the requested donate as @donate' do
81
- donate = FactoryGirl.create(:donate)
81
+ donate = FactoryBot.create(:donate)
82
82
  get :show, id: donate.id
83
83
  expect(assigns(:donate)).to eq(donate)
84
84
  end
@@ -128,7 +128,7 @@ describe DonatesController do
128
128
  login_fixture_admin
129
129
 
130
130
  it 'assigns the requested donate as @donate' do
131
- donate = FactoryGirl.create(:donate)
131
+ donate = FactoryBot.create(:donate)
132
132
  get :edit, id: donate.id
133
133
  expect(assigns(:donate)).to eq(donate)
134
134
  end
@@ -138,7 +138,7 @@ describe DonatesController do
138
138
  login_fixture_librarian
139
139
 
140
140
  it 'assigns the requested donate as @donate' do
141
- donate = FactoryGirl.create(:donate)
141
+ donate = FactoryBot.create(:donate)
142
142
  get :edit, id: donate.id
143
143
  expect(assigns(:donate)).to eq(donate)
144
144
  end
@@ -148,7 +148,7 @@ describe DonatesController do
148
148
  login_fixture_user
149
149
 
150
150
  it 'assigns the requested donate as @donate' do
151
- donate = FactoryGirl.create(:donate)
151
+ donate = FactoryBot.create(:donate)
152
152
  get :edit, id: donate.id
153
153
  expect(response).to be_forbidden
154
154
  end
@@ -156,7 +156,7 @@ describe DonatesController do
156
156
 
157
157
  describe 'When not logged in' do
158
158
  it 'should not assign the requested donate as @donate' do
159
- donate = FactoryGirl.create(:donate)
159
+ donate = FactoryBot.create(:donate)
160
160
  get :edit, id: donate.id
161
161
  expect(response).to redirect_to(new_user_session_url)
162
162
  end
@@ -282,7 +282,7 @@ describe DonatesController do
282
282
 
283
283
  describe 'PUT update' do
284
284
  before(:each) do
285
- @donate = FactoryGirl.create(:donate)
285
+ @donate = FactoryBot.create(:donate)
286
286
  @attrs = valid_attributes
287
287
  @invalid_attrs = { item_id: '' }
288
288
  end
@@ -383,7 +383,7 @@ describe DonatesController do
383
383
 
384
384
  describe 'DELETE destroy' do
385
385
  before(:each) do
386
- @donate = FactoryGirl.create(:donate)
386
+ @donate = FactoryBot.create(:donate)
387
387
  end
388
388
 
389
389
  describe 'When logged in as Administrator' do