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
@@ -5,7 +5,7 @@ describe UserCheckoutStatsController do
5
5
 
6
6
  describe 'GET index' do
7
7
  before(:each) do
8
- FactoryGirl.create(:user_checkout_stat)
8
+ FactoryBot.create(:user_checkout_stat)
9
9
  end
10
10
 
11
11
  describe 'When logged in as Administrator' do
@@ -50,7 +50,7 @@ describe UserCheckoutStatsController do
50
50
  login_fixture_admin
51
51
 
52
52
  it 'assigns the requested user_checkout_stat as @user_checkout_stat' do
53
- user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
53
+ user_checkout_stat = FactoryBot.create(:user_checkout_stat)
54
54
  get :show, id: user_checkout_stat.id
55
55
  assigns(:user_checkout_stat).should eq(user_checkout_stat)
56
56
  end
@@ -60,7 +60,7 @@ describe UserCheckoutStatsController do
60
60
  login_fixture_librarian
61
61
 
62
62
  it 'assigns the requested user_checkout_stat as @user_checkout_stat' do
63
- user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
63
+ user_checkout_stat = FactoryBot.create(:user_checkout_stat)
64
64
  get :show, id: user_checkout_stat.id
65
65
  assigns(:user_checkout_stat).should eq(user_checkout_stat)
66
66
  end
@@ -70,7 +70,7 @@ describe UserCheckoutStatsController do
70
70
  login_fixture_user
71
71
 
72
72
  it 'assigns the requested user_checkout_stat as @user_checkout_stat' do
73
- user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
73
+ user_checkout_stat = FactoryBot.create(:user_checkout_stat)
74
74
  get :show, id: user_checkout_stat.id
75
75
  assigns(:user_checkout_stat).should eq(user_checkout_stat)
76
76
  response.should be_forbidden
@@ -79,7 +79,7 @@ describe UserCheckoutStatsController do
79
79
 
80
80
  describe 'When not logged in' do
81
81
  it 'assigns the requested user_checkout_stat as @user_checkout_stat' do
82
- user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
82
+ user_checkout_stat = FactoryBot.create(:user_checkout_stat)
83
83
  get :show, id: user_checkout_stat.id
84
84
  assigns(:user_checkout_stat).should eq(user_checkout_stat)
85
85
  response.should redirect_to(new_user_session_url)
@@ -130,7 +130,7 @@ describe UserCheckoutStatsController do
130
130
  login_fixture_admin
131
131
 
132
132
  it 'assigns the requested user_checkout_stat as @user_checkout_stat' do
133
- user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
133
+ user_checkout_stat = FactoryBot.create(:user_checkout_stat)
134
134
  get :edit, id: user_checkout_stat.id
135
135
  assigns(:user_checkout_stat).should eq(user_checkout_stat)
136
136
  end
@@ -140,7 +140,7 @@ describe UserCheckoutStatsController do
140
140
  login_fixture_librarian
141
141
 
142
142
  it 'assigns the requested user_checkout_stat as @user_checkout_stat' do
143
- user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
143
+ user_checkout_stat = FactoryBot.create(:user_checkout_stat)
144
144
  get :edit, id: user_checkout_stat.id
145
145
  assigns(:user_checkout_stat).should eq(user_checkout_stat)
146
146
  end
@@ -150,7 +150,7 @@ describe UserCheckoutStatsController do
150
150
  login_fixture_user
151
151
 
152
152
  it 'assigns the requested user_checkout_stat as @user_checkout_stat' do
153
- user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
153
+ user_checkout_stat = FactoryBot.create(:user_checkout_stat)
154
154
  get :edit, id: user_checkout_stat.id
155
155
  response.should be_forbidden
156
156
  end
@@ -158,7 +158,7 @@ describe UserCheckoutStatsController do
158
158
 
159
159
  describe 'When not logged in' do
160
160
  it 'should not assign the requested user_checkout_stat as @user_checkout_stat' do
161
- user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
161
+ user_checkout_stat = FactoryBot.create(:user_checkout_stat)
162
162
  get :edit, id: user_checkout_stat.id
163
163
  response.should redirect_to(new_user_session_url)
164
164
  end
@@ -167,7 +167,7 @@ describe UserCheckoutStatsController do
167
167
 
168
168
  describe 'POST create' do
169
169
  before(:each) do
170
- @attrs = FactoryGirl.attributes_for(:user_checkout_stat)
170
+ @attrs = FactoryBot.attributes_for(:user_checkout_stat)
171
171
  @invalid_attrs = { start_date: '' }
172
172
  end
173
173
 
@@ -284,8 +284,8 @@ describe UserCheckoutStatsController do
284
284
 
285
285
  describe 'PUT update' do
286
286
  before(:each) do
287
- @user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
288
- @attrs = FactoryGirl.attributes_for(:user_checkout_stat)
287
+ @user_checkout_stat = FactoryBot.create(:user_checkout_stat)
288
+ @attrs = FactoryBot.attributes_for(:user_checkout_stat)
289
289
  @invalid_attrs = { start_date: '' }
290
290
  end
291
291
 
@@ -385,7 +385,7 @@ describe UserCheckoutStatsController do
385
385
 
386
386
  describe 'DELETE destroy' do
387
387
  before(:each) do
388
- @user_checkout_stat = FactoryGirl.create(:user_checkout_stat)
388
+ @user_checkout_stat = FactoryBot.create(:user_checkout_stat)
389
389
  end
390
390
 
391
391
  describe 'When logged in as Administrator' do
@@ -46,7 +46,7 @@ describe UserGroupHasCheckoutTypesController do
46
46
  login_fixture_admin
47
47
 
48
48
  it 'assigns the requested user_group_has_checkout_type as @user_group_has_checkout_type' do
49
- user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
49
+ user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
50
50
  get :show, id: user_group_has_checkout_type.id
51
51
  assigns(:user_group_has_checkout_type).should eq(user_group_has_checkout_type)
52
52
  end
@@ -56,7 +56,7 @@ describe UserGroupHasCheckoutTypesController do
56
56
  login_fixture_librarian
57
57
 
58
58
  it 'assigns the requested user_group_has_checkout_type as @user_group_has_checkout_type' do
59
- user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
59
+ user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
60
60
  get :show, id: user_group_has_checkout_type.id
61
61
  assigns(:user_group_has_checkout_type).should eq(user_group_has_checkout_type)
62
62
  end
@@ -66,7 +66,7 @@ describe UserGroupHasCheckoutTypesController do
66
66
  login_fixture_user
67
67
 
68
68
  it 'assigns the requested user_group_has_checkout_type as @user_group_has_checkout_type' do
69
- user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
69
+ user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
70
70
  get :show, id: user_group_has_checkout_type.id
71
71
  assigns(:user_group_has_checkout_type).should eq(user_group_has_checkout_type)
72
72
  end
@@ -74,7 +74,7 @@ describe UserGroupHasCheckoutTypesController do
74
74
 
75
75
  describe 'When not logged in' do
76
76
  it 'assigns the requested user_group_has_checkout_type as @user_group_has_checkout_type' do
77
- user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
77
+ user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
78
78
  get :show, id: user_group_has_checkout_type.id
79
79
  assigns(:user_group_has_checkout_type).should eq(user_group_has_checkout_type)
80
80
  end
@@ -126,7 +126,7 @@ describe UserGroupHasCheckoutTypesController do
126
126
  login_fixture_admin
127
127
 
128
128
  it 'assigns the requested user_group_has_checkout_type as @user_group_has_checkout_type' do
129
- user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
129
+ user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
130
130
  get :edit, id: user_group_has_checkout_type.id
131
131
  assigns(:user_group_has_checkout_type).should eq(user_group_has_checkout_type)
132
132
  end
@@ -136,7 +136,7 @@ describe UserGroupHasCheckoutTypesController do
136
136
  login_fixture_librarian
137
137
 
138
138
  it 'assigns the requested user_group_has_checkout_type as @user_group_has_checkout_type' do
139
- user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
139
+ user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
140
140
  get :edit, id: user_group_has_checkout_type.id
141
141
  response.should be_forbidden
142
142
  end
@@ -146,7 +146,7 @@ describe UserGroupHasCheckoutTypesController do
146
146
  login_fixture_user
147
147
 
148
148
  it 'assigns the requested user_group_has_checkout_type as @user_group_has_checkout_type' do
149
- user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
149
+ user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
150
150
  get :edit, id: user_group_has_checkout_type.id
151
151
  response.should be_forbidden
152
152
  end
@@ -154,7 +154,7 @@ describe UserGroupHasCheckoutTypesController do
154
154
 
155
155
  describe 'When not logged in' do
156
156
  it 'should not assign the requested user_group_has_checkout_type as @user_group_has_checkout_type' do
157
- user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
157
+ user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
158
158
  get :edit, id: user_group_has_checkout_type.id
159
159
  response.should redirect_to(new_user_session_url)
160
160
  end
@@ -163,7 +163,7 @@ describe UserGroupHasCheckoutTypesController do
163
163
 
164
164
  describe 'POST create' do
165
165
  before(:each) do
166
- @attrs = FactoryGirl.attributes_for(:user_group_has_checkout_type)
166
+ @attrs = FactoryBot.attributes_for(:user_group_has_checkout_type)
167
167
  @invalid_attrs = { user_group_id: '' }
168
168
  end
169
169
 
@@ -280,8 +280,8 @@ describe UserGroupHasCheckoutTypesController do
280
280
 
281
281
  describe 'PUT update' do
282
282
  before(:each) do
283
- @user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
284
- @attrs = FactoryGirl.attributes_for(:user_group_has_checkout_type)
283
+ @user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
284
+ @attrs = FactoryBot.attributes_for(:user_group_has_checkout_type)
285
285
  @invalid_attrs = { user_group_id: '' }
286
286
  end
287
287
 
@@ -376,7 +376,7 @@ describe UserGroupHasCheckoutTypesController do
376
376
 
377
377
  describe 'DELETE destroy' do
378
378
  before(:each) do
379
- @user_group_has_checkout_type = FactoryGirl.create(:user_group_has_checkout_type)
379
+ @user_group_has_checkout_type = FactoryBot.create(:user_group_has_checkout_type)
380
380
  end
381
381
 
382
382
  describe 'When logged in as Administrator' do
@@ -5,7 +5,7 @@ describe UserReserveStatsController do
5
5
 
6
6
  describe 'GET index' do
7
7
  before(:each) do
8
- FactoryGirl.create(:user_reserve_stat)
8
+ FactoryBot.create(:user_reserve_stat)
9
9
  end
10
10
 
11
11
  describe 'When logged in as Administrator' do
@@ -50,7 +50,7 @@ describe UserReserveStatsController do
50
50
  login_fixture_admin
51
51
 
52
52
  it 'assigns the requested user_reserve_stat as @user_reserve_stat' do
53
- user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
53
+ user_reserve_stat = FactoryBot.create(:user_reserve_stat)
54
54
  get :show, id: user_reserve_stat.id
55
55
  assigns(:user_reserve_stat).should eq(user_reserve_stat)
56
56
  end
@@ -60,7 +60,7 @@ describe UserReserveStatsController do
60
60
  login_fixture_librarian
61
61
 
62
62
  it 'assigns the requested user_reserve_stat as @user_reserve_stat' do
63
- user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
63
+ user_reserve_stat = FactoryBot.create(:user_reserve_stat)
64
64
  get :show, id: user_reserve_stat.id
65
65
  assigns(:user_reserve_stat).should eq(user_reserve_stat)
66
66
  end
@@ -70,7 +70,7 @@ describe UserReserveStatsController do
70
70
  login_fixture_user
71
71
 
72
72
  it 'assigns the requested user_reserve_stat as @user_reserve_stat' do
73
- user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
73
+ user_reserve_stat = FactoryBot.create(:user_reserve_stat)
74
74
  get :show, id: user_reserve_stat.id
75
75
  assigns(:user_reserve_stat).should eq(user_reserve_stat)
76
76
  response.should be_forbidden
@@ -79,7 +79,7 @@ describe UserReserveStatsController do
79
79
 
80
80
  describe 'When not logged in' do
81
81
  it 'assigns the requested user_reserve_stat as @user_reserve_stat' do
82
- user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
82
+ user_reserve_stat = FactoryBot.create(:user_reserve_stat)
83
83
  get :show, id: user_reserve_stat.id
84
84
  assigns(:user_reserve_stat).should eq(user_reserve_stat)
85
85
  response.should redirect_to(new_user_session_url)
@@ -130,7 +130,7 @@ describe UserReserveStatsController do
130
130
  login_fixture_admin
131
131
 
132
132
  it 'assigns the requested user_reserve_stat as @user_reserve_stat' do
133
- user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
133
+ user_reserve_stat = FactoryBot.create(:user_reserve_stat)
134
134
  get :edit, id: user_reserve_stat.id
135
135
  assigns(:user_reserve_stat).should eq(user_reserve_stat)
136
136
  end
@@ -140,7 +140,7 @@ describe UserReserveStatsController do
140
140
  login_fixture_librarian
141
141
 
142
142
  it 'assigns the requested user_reserve_stat as @user_reserve_stat' do
143
- user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
143
+ user_reserve_stat = FactoryBot.create(:user_reserve_stat)
144
144
  get :edit, id: user_reserve_stat.id
145
145
  assigns(:user_reserve_stat).should eq(user_reserve_stat)
146
146
  end
@@ -150,7 +150,7 @@ describe UserReserveStatsController do
150
150
  login_fixture_user
151
151
 
152
152
  it 'assigns the requested user_reserve_stat as @user_reserve_stat' do
153
- user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
153
+ user_reserve_stat = FactoryBot.create(:user_reserve_stat)
154
154
  get :edit, id: user_reserve_stat.id
155
155
  response.should be_forbidden
156
156
  end
@@ -158,7 +158,7 @@ describe UserReserveStatsController do
158
158
 
159
159
  describe 'When not logged in' do
160
160
  it 'should not assign the requested user_reserve_stat as @user_reserve_stat' do
161
- user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
161
+ user_reserve_stat = FactoryBot.create(:user_reserve_stat)
162
162
  get :edit, id: user_reserve_stat.id
163
163
  response.should redirect_to(new_user_session_url)
164
164
  end
@@ -167,7 +167,7 @@ describe UserReserveStatsController do
167
167
 
168
168
  describe 'POST create' do
169
169
  before(:each) do
170
- @attrs = FactoryGirl.attributes_for(:user_reserve_stat)
170
+ @attrs = FactoryBot.attributes_for(:user_reserve_stat)
171
171
  @invalid_attrs = { start_date: '' }
172
172
  end
173
173
 
@@ -284,8 +284,8 @@ describe UserReserveStatsController do
284
284
 
285
285
  describe 'PUT update' do
286
286
  before(:each) do
287
- @user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
288
- @attrs = FactoryGirl.attributes_for(:user_reserve_stat)
287
+ @user_reserve_stat = FactoryBot.create(:user_reserve_stat)
288
+ @attrs = FactoryBot.attributes_for(:user_reserve_stat)
289
289
  @invalid_attrs = { start_date: '' }
290
290
  end
291
291
 
@@ -385,7 +385,7 @@ describe UserReserveStatsController do
385
385
 
386
386
  describe 'DELETE destroy' do
387
387
  before(:each) do
388
- @user_reserve_stat = FactoryGirl.create(:user_reserve_stat)
388
+ @user_reserve_stat = FactoryBot.create(:user_reserve_stat)
389
389
  end
390
390
 
391
391
  describe 'When logged in as Administrator' do
@@ -1,10 +1,10 @@
1
1
  # Read about factories at https://github.com/thoughtbot/factory_girl
2
2
 
3
- FactoryGirl.define do
3
+ FactoryBot.define do
4
4
  factory :accept do
5
- basket_id{FactoryGirl.create(:basket).id}
6
- item_id{FactoryGirl.create(:item).id}
7
- librarian_id{FactoryGirl.create(:librarian).id}
5
+ basket_id{FactoryBot.create(:basket).id}
6
+ item_id{FactoryBot.create(:item).id}
7
+ librarian_id{FactoryBot.create(:librarian).id}
8
8
  end
9
9
  end
10
10
 
@@ -1,5 +1,5 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :basket do |f|
3
- f.user_id{FactoryGirl.create(:user).id}
3
+ f.user_id{FactoryBot.create(:user).id}
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :carrier_type do |f|
3
3
  f.sequence(:name){|n| "carrier_type_#{n}"}
4
4
  end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :carrier_type_has_checkout_type do |f|
3
- f.carrier_type_id{FactoryGirl.create(:carrier_type).id}
4
- f.checkout_type_id{FactoryGirl.create(:checkout_type).id}
3
+ f.carrier_type_id{FactoryBot.create(:carrier_type).id}
4
+ f.checkout_type_id{FactoryBot.create(:checkout_type).id}
5
5
  end
6
6
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :checkout, :class => Checkout do |f|
3
3
  f.due_date Time.zone.now.next_week
4
4
  f.association :item, factory: :item
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :checkout_stat do |f|
3
3
  f.start_date 1.week.ago
4
4
  f.end_date 1.day.ago
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :checkout_stat_has_manifestation do |f|
3
- f.manifestation_checkout_stat_id{FactoryGirl.create(:manifestation_checkout_stat).id}
4
- f.manifestation_id{FactoryGirl.create(:manifestation).id}
3
+ f.manifestation_checkout_stat_id{FactoryBot.create(:manifestation_checkout_stat).id}
4
+ f.manifestation_id{FactoryBot.create(:manifestation).id}
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :checkout_stat_has_user do |f|
3
- f.user_checkout_stat_id{FactoryGirl.create(:user_checkout_stat).id}
4
- f.user_id{FactoryGirl.create(:user).id}
3
+ f.user_checkout_stat_id{FactoryBot.create(:user_checkout_stat).id}
4
+ f.user_id{FactoryBot.create(:user).id}
5
5
  end
6
6
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :checkout_type do |f|
3
3
  f.sequence(:name){|n| "checkout_type_#{n}"}
4
4
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :circulation_status do |f|
3
3
  f.sequence(:name){|n| "circulation_status_#{n}"}
4
4
  end
@@ -1,7 +1,7 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :item do |f|
3
3
  f.sequence(:item_identifier){|n| "item_#{n}"}
4
4
  f.circulation_status_id{CirculationStatus.find(1).id} if defined?(EnjuCircuation)
5
- f.manifestation_id{FactoryGirl.create(:manifestation).id}
5
+ f.manifestation_id{FactoryBot.create(:manifestation).id}
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :item_has_use_restriction do |f|
3
- f.item_id{FactoryGirl.create(:item).id}
4
- f.use_restriction_id{FactoryGirl.create(:use_restriction).id}
3
+ f.item_id{FactoryBot.create(:item).id}
4
+ f.use_restriction_id{FactoryBot.create(:use_restriction).id}
5
5
  end
6
6
  end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :lending_policy do |f|
3
- f.user_group_id{FactoryGirl.create(:user_group).id}
4
- f.item_id{FactoryGirl.create(:item).id}
3
+ f.user_group_id{FactoryBot.create(:user_group).id}
4
+ f.item_id{FactoryBot.create(:item).id}
5
5
  end
6
6
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :manifestation do |f|
3
3
  f.sequence(:original_title){|n| "manifestation_title_#{n}"}
4
4
  f.carrier_type_id{CarrierType.find(1).id}
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :manifestation_checkout_stat do |f|
3
3
  f.start_date 1.week.ago
4
4
  f.end_date 1.day.ago
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :manifestation_reserve_stat do |f|
3
3
  f.start_date 1.week.ago
4
4
  f.end_date 1.day.ago