enju_circulation 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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/enju_circulation/version.rb +1 -1
  3. data/lib/generators/enju_circulation/update/update_generator.rb +1 -1
  4. data/lib/tasks/enju_circulation_tasks.rake +1 -1
  5. data/spec/concerns/enju_accept_spec.rb +5 -5
  6. data/spec/controllers/carrier_type_has_checkout_types_controller_spec.rb +13 -13
  7. data/spec/controllers/checkout_types_controller_spec.rb +13 -13
  8. data/spec/controllers/checkouts_controller_spec.rb +1 -1
  9. data/spec/controllers/circulation_statuses_controller_spec.rb +12 -12
  10. data/spec/controllers/item_has_use_restrictions_controller_spec.rb +12 -12
  11. data/spec/controllers/lending_policies_controller_spec.rb +9 -9
  12. data/spec/controllers/manifestation_checkout_stats_controller_spec.rb +13 -13
  13. data/spec/controllers/manifestation_reserve_stats_controller_spec.rb +13 -13
  14. data/spec/controllers/reserves_controller_spec.rb +11 -11
  15. data/spec/controllers/use_restrictions_controller_spec.rb +12 -12
  16. data/spec/controllers/user_checkout_stats_controller_spec.rb +13 -13
  17. data/spec/controllers/user_group_has_checkout_types_controller_spec.rb +12 -12
  18. data/spec/controllers/user_reserve_stats_controller_spec.rb +13 -13
  19. data/spec/factories/accept.rb +4 -4
  20. data/spec/factories/basket.rb +2 -2
  21. data/spec/factories/carrier_type.rb +1 -1
  22. data/spec/factories/carrier_type_has_checkout_type.rb +3 -3
  23. data/spec/factories/checkout.rb +1 -1
  24. data/spec/factories/checkout_stat.rb +1 -1
  25. data/spec/factories/checkout_stat_has_manifestation.rb +3 -3
  26. data/spec/factories/checkout_stat_has_user.rb +3 -3
  27. data/spec/factories/checkout_type.rb +1 -1
  28. data/spec/factories/circulation_status.rb +1 -1
  29. data/spec/factories/item.rb +2 -2
  30. data/spec/factories/item_has_use_restriction.rb +3 -3
  31. data/spec/factories/lending_policy.rb +3 -3
  32. data/spec/factories/manifestation.rb +1 -1
  33. data/spec/factories/manifestation_checkout_stat.rb +1 -1
  34. data/spec/factories/manifestation_reserve_stat.rb +1 -1
  35. data/spec/factories/profile.rb +1 -1
  36. data/spec/factories/reserve.rb +5 -5
  37. data/spec/factories/reserve_stat_has_manifestation.rb +3 -3
  38. data/spec/factories/reserve_stat_has_user.rb +3 -3
  39. data/spec/factories/use_restriction.rb +1 -1
  40. data/spec/factories/user.rb +1 -1
  41. data/spec/factories/user_checkout_stat.rb +1 -1
  42. data/spec/factories/user_group.rb +1 -1
  43. data/spec/factories/user_group_has_checkout_type.rb +3 -3
  44. data/spec/factories/user_reserve_stat.rb +1 -1
  45. data/spec/models/reserve_spec.rb +9 -9
  46. data/spec/rails_helper.rb +3 -3
  47. data/spec/support/controller_macros.rb +3 -3
  48. data/spec/views/checked_items/new.html.erb_spec.rb +3 -3
  49. data/spec/views/reserves/index.html.erb_spec.rb +1 -1
  50. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5455d6e85cabbc15d732b183f13c22605c19dc6
4
- data.tar.gz: 8116c7f2b479d87f4e3703d15131bf9ecb5f2806
3
+ metadata.gz: 1c7dd7a5e75571acdc8dde4eaa51b41285669e9c
4
+ data.tar.gz: 1d925968dff36c5de25ece699685a5c5712034af
5
5
  SHA512:
6
- metadata.gz: 9c75125044bfd06a8bbca14ba19a8b08b0d04074c4bd15bb522a59fe52ef9809663581343822bffc52bde932dac3739baef52406e52423d74eb3a6edef5061fc
7
- data.tar.gz: d8b52b02a9e9ec183c76466b3dda0ba8502a01afde2c17bcc9d45d298eb1e2e97852afcffbb7a627b331ed6fb3e0d3401d4f9acf3ede118c7e710e7dc2c33842
6
+ metadata.gz: 4324c83b957e1fe7e6638aa069dbf76f3fc58ad723175bb552ed8db94af047ec02af8faed9581831b4627c6954002af5e0b595dc39edd308934c493e060c2874
7
+ data.tar.gz: 5a7f410f273fb3fcbe4281604b027f5a922cfaeae5e85da3554f7aeedd6d75841ec68c490477250279a03cbbfa28760fd3942a2395072bfe3e8cdfa7bb23a80f
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -2,7 +2,7 @@ class EnjuCirculation::UpdateGenerator < Rails::Generators::Base
2
2
  source_root File.expand_path('../templates', __FILE__)
3
3
  desc "Create files for updating Next-L Enju"
4
4
 
5
- def copy_migration_files
5
+ def copy_statesman_migration_files
6
6
  generate('statesman:add_constraints_to_most_recent', 'Reserve', 'ReserveTransition')
7
7
  end
8
8
  end
@@ -43,7 +43,7 @@ namespace :enju_circulation do
43
43
  Rake::Task['statesman:backfill_most_recent'].invoke('ManifestationCheckoutStat')
44
44
  Rake::Task['statesman:backfill_most_recent'].invoke('ManifestationReserveStat')
45
45
  Rake::Task['statesman:backfill_most_recent'].invoke('UserCheckoutStat')
46
- Rake::Task['statesman:backfill_most_recent'].invoke('UserCheckoutStat')
46
+ Rake::Task['statesman:backfill_most_recent'].invoke('UserReserveStat')
47
47
  Rake::Task['statesman:backfill_most_recent'].invoke('Reserve')
48
48
  puts 'enju_circulation: The upgrade completed successfully.'
49
49
  end
@@ -7,7 +7,7 @@ end
7
7
  describe EnjuCirculation::EnjuAccept do
8
8
  fixtures :all
9
9
  it "should successfully accept" do
10
- accept = MyAccept.new(FactoryGirl.attributes_for(:accept))
10
+ accept = MyAccept.new(FactoryBot.attributes_for(:accept))
11
11
  expect(accept.item).to be_truthy
12
12
  expect(accept.item.circulation_status.name).to eq "In Process"
13
13
  accept.save!
@@ -15,13 +15,13 @@ describe EnjuCirculation::EnjuAccept do
15
15
  expect(accept.item.use_restriction.name).to eq "Limited Circulation, Normal Loan Period"
16
16
  end
17
17
  it "should reflect to items list", solr: true do
18
- FactoryGirl.create(:item)
19
- FactoryGirl.create(:item)
20
- FactoryGirl.create(:item)
18
+ FactoryBot.create(:item)
19
+ FactoryBot.create(:item)
20
+ FactoryBot.create(:item)
21
21
  result = Item.search.build { facet :circulation_status }.execute
22
22
  inprocess_count = result.facet(:circulation_status).rows.find{|e| e.value == "In Process" }.count
23
23
  onshelf_count = result.facet(:circulation_status).rows.find{|e| e.value == "Available On Shelf" }.try(:count) || 0
24
- accept = MyAccept.new(FactoryGirl.attributes_for(:accept))
24
+ accept = MyAccept.new(FactoryBot.attributes_for(:accept))
25
25
  accept.save!
26
26
  result = Item.search.build { facet :circulation_status }.execute
27
27
  expect(result.facet(:circulation_status).rows.find{|e| e.value == "In Process" }.count).to eq inprocess_count
@@ -5,7 +5,7 @@ describe CarrierTypeHasCheckoutTypesController do
5
5
 
6
6
  describe 'GET index' do
7
7
  before(:each) do
8
- FactoryGirl.create(:carrier_type_has_checkout_type)
8
+ FactoryBot.create(:carrier_type_has_checkout_type)
9
9
  end
10
10
 
11
11
  describe 'When logged in as Administrator' do
@@ -50,7 +50,7 @@ describe CarrierTypeHasCheckoutTypesController do
50
50
  login_fixture_admin
51
51
 
52
52
  it 'assigns the requested carrier_type_has_checkout_type as @carrier_type_has_checkout_type' do
53
- carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
53
+ carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
54
54
  get :show, id: carrier_type_has_checkout_type.id
55
55
  assigns(:carrier_type_has_checkout_type).should eq(carrier_type_has_checkout_type)
56
56
  end
@@ -60,7 +60,7 @@ describe CarrierTypeHasCheckoutTypesController do
60
60
  login_fixture_librarian
61
61
 
62
62
  it 'assigns the requested carrier_type_has_checkout_type as @carrier_type_has_checkout_type' do
63
- carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
63
+ carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
64
64
  get :show, id: carrier_type_has_checkout_type.id
65
65
  assigns(:carrier_type_has_checkout_type).should eq(carrier_type_has_checkout_type)
66
66
  end
@@ -70,7 +70,7 @@ describe CarrierTypeHasCheckoutTypesController do
70
70
  login_fixture_user
71
71
 
72
72
  it 'assigns the requested carrier_type_has_checkout_type as @carrier_type_has_checkout_type' do
73
- carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
73
+ carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
74
74
  get :show, id: carrier_type_has_checkout_type.id
75
75
  assigns(:carrier_type_has_checkout_type).should eq(carrier_type_has_checkout_type)
76
76
  end
@@ -78,7 +78,7 @@ describe CarrierTypeHasCheckoutTypesController do
78
78
 
79
79
  describe 'When not logged in' do
80
80
  it 'assigns the requested carrier_type_has_checkout_type as @carrier_type_has_checkout_type' do
81
- carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
81
+ carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
82
82
  get :show, id: carrier_type_has_checkout_type.id
83
83
  assigns(:carrier_type_has_checkout_type).should eq(carrier_type_has_checkout_type)
84
84
  end
@@ -130,7 +130,7 @@ describe CarrierTypeHasCheckoutTypesController do
130
130
  login_fixture_admin
131
131
 
132
132
  it 'assigns the requested carrier_type_has_checkout_type as @carrier_type_has_checkout_type' do
133
- carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
133
+ carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
134
134
  get :edit, id: carrier_type_has_checkout_type.id
135
135
  assigns(:carrier_type_has_checkout_type).should eq(carrier_type_has_checkout_type)
136
136
  end
@@ -140,7 +140,7 @@ describe CarrierTypeHasCheckoutTypesController do
140
140
  login_fixture_librarian
141
141
 
142
142
  it 'assigns the requested carrier_type_has_checkout_type as @carrier_type_has_checkout_type' do
143
- carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
143
+ carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
144
144
  get :edit, id: carrier_type_has_checkout_type.id
145
145
  assigns(:carrier_type_has_checkout_type).should eq(carrier_type_has_checkout_type)
146
146
  end
@@ -150,7 +150,7 @@ describe CarrierTypeHasCheckoutTypesController do
150
150
  login_fixture_user
151
151
 
152
152
  it 'assigns the requested carrier_type_has_checkout_type as @carrier_type_has_checkout_type' do
153
- carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
153
+ carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
154
154
  get :edit, id: carrier_type_has_checkout_type.id
155
155
  response.should be_forbidden
156
156
  end
@@ -158,7 +158,7 @@ describe CarrierTypeHasCheckoutTypesController do
158
158
 
159
159
  describe 'When not logged in' do
160
160
  it 'should not assign the requested carrier_type_has_checkout_type as @carrier_type_has_checkout_type' do
161
- carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
161
+ carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
162
162
  get :edit, id: carrier_type_has_checkout_type.id
163
163
  response.should redirect_to(new_user_session_url)
164
164
  end
@@ -167,7 +167,7 @@ describe CarrierTypeHasCheckoutTypesController do
167
167
 
168
168
  describe 'POST create' do
169
169
  before(:each) do
170
- @attrs = FactoryGirl.attributes_for(:carrier_type_has_checkout_type)
170
+ @attrs = FactoryBot.attributes_for(:carrier_type_has_checkout_type)
171
171
  @invalid_attrs = { carrier_type_id: '' }
172
172
  end
173
173
 
@@ -284,8 +284,8 @@ describe CarrierTypeHasCheckoutTypesController do
284
284
 
285
285
  describe 'PUT update' do
286
286
  before(:each) do
287
- @carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
288
- @attrs = FactoryGirl.attributes_for(:carrier_type_has_checkout_type)
287
+ @carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
288
+ @attrs = FactoryBot.attributes_for(:carrier_type_has_checkout_type)
289
289
  @invalid_attrs = { carrier_type_id: '' }
290
290
  end
291
291
 
@@ -385,7 +385,7 @@ describe CarrierTypeHasCheckoutTypesController do
385
385
 
386
386
  describe 'DELETE destroy' do
387
387
  before(:each) do
388
- @carrier_type_has_checkout_type = FactoryGirl.create(:carrier_type_has_checkout_type)
388
+ @carrier_type_has_checkout_type = FactoryBot.create(:carrier_type_has_checkout_type)
389
389
  end
390
390
 
391
391
  describe 'When logged in as Administrator' do
@@ -5,7 +5,7 @@ describe CheckoutTypesController do
5
5
 
6
6
  describe 'GET index' do
7
7
  before(:each) do
8
- FactoryGirl.create(:checkout_type)
8
+ FactoryBot.create(:checkout_type)
9
9
  end
10
10
 
11
11
  describe 'When logged in as Administrator' do
@@ -50,7 +50,7 @@ describe CheckoutTypesController do
50
50
  login_fixture_admin
51
51
 
52
52
  it 'assigns the requested checkout_type as @checkout_type' do
53
- checkout_type = FactoryGirl.create(:checkout_type)
53
+ checkout_type = FactoryBot.create(:checkout_type)
54
54
  get :show, id: checkout_type.id
55
55
  assigns(:checkout_type).should eq(checkout_type)
56
56
  end
@@ -60,7 +60,7 @@ describe CheckoutTypesController do
60
60
  login_fixture_librarian
61
61
 
62
62
  it 'assigns the requested checkout_type as @checkout_type' do
63
- checkout_type = FactoryGirl.create(:checkout_type)
63
+ checkout_type = FactoryBot.create(:checkout_type)
64
64
  get :show, id: checkout_type.id
65
65
  assigns(:checkout_type).should eq(checkout_type)
66
66
  end
@@ -70,7 +70,7 @@ describe CheckoutTypesController do
70
70
  login_fixture_user
71
71
 
72
72
  it 'assigns the requested checkout_type as @checkout_type' do
73
- checkout_type = FactoryGirl.create(:checkout_type)
73
+ checkout_type = FactoryBot.create(:checkout_type)
74
74
  get :show, id: checkout_type.id
75
75
  assigns(:checkout_type).should eq(checkout_type)
76
76
  end
@@ -78,7 +78,7 @@ describe CheckoutTypesController do
78
78
 
79
79
  describe 'When not logged in' do
80
80
  it 'assigns the requested checkout_type as @checkout_type' do
81
- checkout_type = FactoryGirl.create(:checkout_type)
81
+ checkout_type = FactoryBot.create(:checkout_type)
82
82
  get :show, id: checkout_type.id
83
83
  assigns(:checkout_type).should eq(checkout_type)
84
84
  end
@@ -130,7 +130,7 @@ describe CheckoutTypesController do
130
130
  login_fixture_admin
131
131
 
132
132
  it 'assigns the requested checkout_type as @checkout_type' do
133
- checkout_type = FactoryGirl.create(:checkout_type)
133
+ checkout_type = FactoryBot.create(:checkout_type)
134
134
  get :edit, id: checkout_type.id
135
135
  assigns(:checkout_type).should eq(checkout_type)
136
136
  end
@@ -140,7 +140,7 @@ describe CheckoutTypesController do
140
140
  login_fixture_librarian
141
141
 
142
142
  it 'assigns the requested checkout_type as @checkout_type' do
143
- checkout_type = FactoryGirl.create(:checkout_type)
143
+ checkout_type = FactoryBot.create(:checkout_type)
144
144
  get :edit, id: checkout_type.id
145
145
  response.should be_forbidden
146
146
  end
@@ -150,7 +150,7 @@ describe CheckoutTypesController do
150
150
  login_fixture_user
151
151
 
152
152
  it 'assigns the requested checkout_type as @checkout_type' do
153
- checkout_type = FactoryGirl.create(:checkout_type)
153
+ checkout_type = FactoryBot.create(:checkout_type)
154
154
  get :edit, id: checkout_type.id
155
155
  response.should be_forbidden
156
156
  end
@@ -158,7 +158,7 @@ describe CheckoutTypesController do
158
158
 
159
159
  describe 'When not logged in' do
160
160
  it 'should not assign the requested checkout_type as @checkout_type' do
161
- checkout_type = FactoryGirl.create(:checkout_type)
161
+ checkout_type = FactoryBot.create(:checkout_type)
162
162
  get :edit, id: checkout_type.id
163
163
  response.should redirect_to(new_user_session_url)
164
164
  end
@@ -167,7 +167,7 @@ describe CheckoutTypesController do
167
167
 
168
168
  describe 'POST create' do
169
169
  before(:each) do
170
- @attrs = FactoryGirl.attributes_for(:checkout_type)
170
+ @attrs = FactoryBot.attributes_for(:checkout_type)
171
171
  @invalid_attrs = { name: '' }
172
172
  end
173
173
 
@@ -284,8 +284,8 @@ describe CheckoutTypesController do
284
284
 
285
285
  describe 'PUT update' do
286
286
  before(:each) do
287
- @checkout_type = FactoryGirl.create(:checkout_type)
288
- @attrs = FactoryGirl.attributes_for(:checkout_type)
287
+ @checkout_type = FactoryBot.create(:checkout_type)
288
+ @attrs = FactoryBot.attributes_for(:checkout_type)
289
289
  @invalid_attrs = { name: '' }
290
290
  end
291
291
 
@@ -385,7 +385,7 @@ describe CheckoutTypesController do
385
385
 
386
386
  describe 'DELETE destroy' do
387
387
  before(:each) do
388
- @checkout_type = FactoryGirl.create(:checkout_type)
388
+ @checkout_type = FactoryBot.create(:checkout_type)
389
389
  end
390
390
 
391
391
  describe 'When logged in as Administrator' do
@@ -9,7 +9,7 @@ describe CheckoutsController do
9
9
  end
10
10
 
11
11
  before(:each) do
12
- FactoryGirl.create(:profile)
12
+ FactoryBot.create(:profile)
13
13
  end
14
14
 
15
15
  describe 'When logged in as Administrator' do
@@ -6,12 +6,12 @@ describe CirculationStatusesController do
6
6
  disconnect_sunspot
7
7
 
8
8
  def valid_attributes
9
- FactoryGirl.attributes_for(:circulation_status)
9
+ FactoryBot.attributes_for(:circulation_status)
10
10
  end
11
11
 
12
12
  describe 'GET index' do
13
13
  before(:each) do
14
- FactoryGirl.create(:circulation_status)
14
+ FactoryBot.create(:circulation_status)
15
15
  end
16
16
 
17
17
  describe 'When logged in as Administrator' do
@@ -54,7 +54,7 @@ describe CirculationStatusesController do
54
54
  login_fixture_admin
55
55
 
56
56
  it 'assigns the requested circulation_status as @circulation_status' do
57
- circulation_status = FactoryGirl.create(:circulation_status)
57
+ circulation_status = FactoryBot.create(:circulation_status)
58
58
  get :show, id: circulation_status.id
59
59
  assigns(:circulation_status).should eq(circulation_status)
60
60
  end
@@ -64,7 +64,7 @@ describe CirculationStatusesController do
64
64
  login_fixture_librarian
65
65
 
66
66
  it 'assigns the requested circulation_status as @circulation_status' do
67
- circulation_status = FactoryGirl.create(:circulation_status)
67
+ circulation_status = FactoryBot.create(:circulation_status)
68
68
  get :show, id: circulation_status.id
69
69
  assigns(:circulation_status).should eq(circulation_status)
70
70
  end
@@ -74,7 +74,7 @@ describe CirculationStatusesController do
74
74
  login_fixture_user
75
75
 
76
76
  it 'assigns the requested circulation_status as @circulation_status' do
77
- circulation_status = FactoryGirl.create(:circulation_status)
77
+ circulation_status = FactoryBot.create(:circulation_status)
78
78
  get :show, id: circulation_status.id
79
79
  assigns(:circulation_status).should eq(circulation_status)
80
80
  end
@@ -82,7 +82,7 @@ describe CirculationStatusesController do
82
82
 
83
83
  describe 'When not logged in' do
84
84
  it 'assigns the requested circulation_status as @circulation_status' do
85
- circulation_status = FactoryGirl.create(:circulation_status)
85
+ circulation_status = FactoryBot.create(:circulation_status)
86
86
  get :show, id: circulation_status.id
87
87
  assigns(:circulation_status).should eq(circulation_status)
88
88
  end
@@ -134,7 +134,7 @@ describe CirculationStatusesController do
134
134
  login_fixture_admin
135
135
 
136
136
  it 'assigns the requested circulation_status as @circulation_status' do
137
- circulation_status = FactoryGirl.create(:circulation_status)
137
+ circulation_status = FactoryBot.create(:circulation_status)
138
138
  get :edit, id: circulation_status.id
139
139
  assigns(:circulation_status).should eq(circulation_status)
140
140
  end
@@ -144,7 +144,7 @@ describe CirculationStatusesController do
144
144
  login_fixture_librarian
145
145
 
146
146
  it 'assigns the requested circulation_status as @circulation_status' do
147
- circulation_status = FactoryGirl.create(:circulation_status)
147
+ circulation_status = FactoryBot.create(:circulation_status)
148
148
  get :edit, id: circulation_status.id
149
149
  response.should be_forbidden
150
150
  end
@@ -154,7 +154,7 @@ describe CirculationStatusesController do
154
154
  login_fixture_user
155
155
 
156
156
  it 'assigns the requested circulation_status as @circulation_status' do
157
- circulation_status = FactoryGirl.create(:circulation_status)
157
+ circulation_status = FactoryBot.create(:circulation_status)
158
158
  get :edit, id: circulation_status.id
159
159
  response.should be_forbidden
160
160
  end
@@ -162,7 +162,7 @@ describe CirculationStatusesController do
162
162
 
163
163
  describe 'When not logged in' do
164
164
  it 'should not assign the requested circulation_status as @circulation_status' do
165
- circulation_status = FactoryGirl.create(:circulation_status)
165
+ circulation_status = FactoryBot.create(:circulation_status)
166
166
  get :edit, id: circulation_status.id
167
167
  response.should redirect_to(new_user_session_url)
168
168
  end
@@ -288,7 +288,7 @@ describe CirculationStatusesController do
288
288
 
289
289
  describe 'PUT update' do
290
290
  before(:each) do
291
- @circulation_status = FactoryGirl.create(:circulation_status)
291
+ @circulation_status = FactoryBot.create(:circulation_status)
292
292
  @attrs = valid_attributes
293
293
  @invalid_attrs = { display_name: '' }
294
294
  end
@@ -389,7 +389,7 @@ describe CirculationStatusesController do
389
389
 
390
390
  describe 'DELETE destroy' do
391
391
  before(:each) do
392
- @circulation_status = FactoryGirl.create(:circulation_status)
392
+ @circulation_status = FactoryBot.create(:circulation_status)
393
393
  end
394
394
 
395
395
  describe 'When logged in as Administrator' do
@@ -6,12 +6,12 @@ describe ItemHasUseRestrictionsController do
6
6
  disconnect_sunspot
7
7
 
8
8
  def valid_attributes
9
- FactoryGirl.attributes_for(:item_has_use_restriction)
9
+ FactoryBot.attributes_for(:item_has_use_restriction)
10
10
  end
11
11
 
12
12
  describe 'GET index' do
13
13
  before(:each) do
14
- FactoryGirl.create(:item_has_use_restriction)
14
+ FactoryBot.create(:item_has_use_restriction)
15
15
  end
16
16
 
17
17
  describe 'When logged in as Administrator' do
@@ -56,7 +56,7 @@ describe ItemHasUseRestrictionsController do
56
56
  login_fixture_admin
57
57
 
58
58
  it 'assigns the requested item_has_use_restriction as @item_has_use_restriction' do
59
- item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
59
+ item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
60
60
  get :show, id: item_has_use_restriction.id
61
61
  assigns(:item_has_use_restriction).should eq(item_has_use_restriction)
62
62
  end
@@ -66,7 +66,7 @@ describe ItemHasUseRestrictionsController do
66
66
  login_fixture_librarian
67
67
 
68
68
  it 'assigns the requested item_has_use_restriction as @item_has_use_restriction' do
69
- item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
69
+ item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
70
70
  get :show, id: item_has_use_restriction.id
71
71
  assigns(:item_has_use_restriction).should eq(item_has_use_restriction)
72
72
  end
@@ -76,7 +76,7 @@ describe ItemHasUseRestrictionsController do
76
76
  login_fixture_user
77
77
 
78
78
  it 'assigns the requested item_has_use_restriction as @item_has_use_restriction' do
79
- item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
79
+ item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
80
80
  get :show, id: item_has_use_restriction.id
81
81
  assigns(:item_has_use_restriction).should eq(item_has_use_restriction)
82
82
  end
@@ -84,7 +84,7 @@ describe ItemHasUseRestrictionsController do
84
84
 
85
85
  describe 'When not logged in' do
86
86
  it 'assigns the requested item_has_use_restriction as @item_has_use_restriction' do
87
- item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
87
+ item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
88
88
  get :show, id: item_has_use_restriction.id
89
89
  assigns(:item_has_use_restriction).should eq(item_has_use_restriction)
90
90
  end
@@ -136,7 +136,7 @@ describe ItemHasUseRestrictionsController do
136
136
  login_fixture_admin
137
137
 
138
138
  it 'assigns the requested item_has_use_restriction as @item_has_use_restriction' do
139
- item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
139
+ item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
140
140
  get :edit, id: item_has_use_restriction.id
141
141
  assigns(:item_has_use_restriction).should eq(item_has_use_restriction)
142
142
  end
@@ -146,7 +146,7 @@ describe ItemHasUseRestrictionsController do
146
146
  login_fixture_librarian
147
147
 
148
148
  it 'assigns the requested item_has_use_restriction as @item_has_use_restriction' do
149
- item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
149
+ item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
150
150
  get :edit, id: item_has_use_restriction.id
151
151
  assigns(:item_has_use_restriction).should eq(item_has_use_restriction)
152
152
  end
@@ -156,7 +156,7 @@ describe ItemHasUseRestrictionsController do
156
156
  login_fixture_user
157
157
 
158
158
  it 'assigns the requested item_has_use_restriction as @item_has_use_restriction' do
159
- item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
159
+ item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
160
160
  get :edit, id: item_has_use_restriction.id
161
161
  response.should be_forbidden
162
162
  end
@@ -164,7 +164,7 @@ describe ItemHasUseRestrictionsController do
164
164
 
165
165
  describe 'When not logged in' do
166
166
  it 'should not assign the requested item_has_use_restriction as @item_has_use_restriction' do
167
- item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
167
+ item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
168
168
  get :edit, id: item_has_use_restriction.id
169
169
  response.should redirect_to(new_user_session_url)
170
170
  end
@@ -290,7 +290,7 @@ describe ItemHasUseRestrictionsController do
290
290
 
291
291
  describe 'PUT update' do
292
292
  before(:each) do
293
- @item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
293
+ @item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
294
294
  @attrs = valid_attributes
295
295
  @invalid_attrs = { item_id: '' }
296
296
  end
@@ -391,7 +391,7 @@ describe ItemHasUseRestrictionsController do
391
391
 
392
392
  describe 'DELETE destroy' do
393
393
  before(:each) do
394
- @item_has_use_restriction = FactoryGirl.create(:item_has_use_restriction)
394
+ @item_has_use_restriction = FactoryBot.create(:item_has_use_restriction)
395
395
  end
396
396
 
397
397
  describe 'When logged in as Administrator' do