enju_library 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/library_groups_controller.rb +23 -1
  3. data/app/models/library.rb +0 -3
  4. data/app/models/library_group.rb +25 -1
  5. data/app/policies/library_group_policy.rb +4 -0
  6. data/app/views/library_groups/_form.html.erb +8 -0
  7. data/app/views/library_groups/show.html.erb +6 -0
  8. data/config/locales/translation_en.yml +1 -0
  9. data/config/locales/translation_ja.yml +1 -0
  10. data/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +5 -0
  11. data/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +5 -0
  12. data/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +5 -0
  13. data/lib/enju_library/engine.rb +1 -0
  14. data/lib/enju_library/version.rb +1 -1
  15. data/lib/generators/enju_library/setup/templates/db/fixtures/library_group/translations.yml +6 -10
  16. data/lib/generators/enju_library/setup/templates/db/fixtures/library_groups.yml +0 -1
  17. data/lib/generators/enju_library/update/update_generator.rb +9 -0
  18. data/spec/controllers/accepts_controller_spec.rb +5 -5
  19. data/spec/controllers/baskets_controller_spec.rb +1 -1
  20. data/spec/controllers/bookstores_controller_spec.rb +6 -6
  21. data/spec/controllers/budget_types_controller_spec.rb +1 -1
  22. data/spec/controllers/libraries_controller_spec.rb +6 -6
  23. data/spec/controllers/request_status_types_controller_spec.rb +6 -6
  24. data/spec/controllers/request_types_controller_spec.rb +6 -6
  25. data/spec/controllers/search_engines_controller_spec.rb +12 -12
  26. data/spec/controllers/shelves_controller_spec.rb +7 -7
  27. data/spec/controllers/subscribes_controller_spec.rb +12 -12
  28. data/spec/controllers/subscriptions_controller_spec.rb +11 -11
  29. data/spec/controllers/user_groups_controller_spec.rb +12 -12
  30. data/spec/controllers/user_import_files_controller_spec.rb +4 -4
  31. data/spec/controllers/withdraws_controller_spec.rb +1 -1
  32. data/spec/dummy/db/schema.rb +3 -2
  33. data/spec/factories/accepts.rb +4 -4
  34. data/spec/factories/basket.rb +2 -2
  35. data/spec/factories/bookstore.rb +1 -1
  36. data/spec/factories/budget_types.rb +1 -1
  37. data/spec/factories/checkout.rb +1 -1
  38. data/spec/factories/item.rb +2 -2
  39. data/spec/factories/library.rb +2 -2
  40. data/spec/factories/manifestation.rb +1 -1
  41. data/spec/factories/profile.rb +2 -2
  42. data/spec/factories/request_status_type.rb +1 -1
  43. data/spec/factories/request_type.rb +1 -1
  44. data/spec/factories/search_engine.rb +1 -1
  45. data/spec/factories/shelf.rb +2 -2
  46. data/spec/factories/subscribe.rb +3 -3
  47. data/spec/factories/subscription.rb +2 -2
  48. data/spec/factories/user.rb +1 -1
  49. data/spec/factories/user_group.rb +1 -1
  50. data/spec/factories/withdraw.rb +4 -4
  51. data/spec/fixtures/library_groups.yml +8 -2
  52. data/spec/models/accept_spec.rb +1 -1
  53. data/spec/models/budget_type_spec.rb +1 -1
  54. data/spec/models/library_group_spec.rb +7 -1
  55. data/spec/models/library_spec.rb +1 -1
  56. data/spec/models/user_import_file_spec.rb +4 -4
  57. data/spec/models/withdraw_spec.rb +1 -1
  58. data/spec/rails_helper.rb +3 -3
  59. data/spec/support/controller_macros.rb +3 -3
  60. data/spec/views/accepts/index.html.erb_spec.rb +1 -1
  61. data/spec/views/accepts/new.html.erb_spec.rb +1 -1
  62. data/spec/views/libraries/show.html.erb_spec.rb +1 -1
  63. data/spec/views/withdraws/edit.html.erb_spec.rb +1 -1
  64. data/spec/views/withdraws/index.html.erb_spec.rb +1 -1
  65. data/spec/views/withdraws/show.html.erb_spec.rb +1 -1
  66. metadata +16 -26
@@ -4,7 +4,7 @@ describe ShelvesController do
4
4
  fixtures :all
5
5
 
6
6
  def valid_attributes
7
- FactoryGirl.attributes_for(:shelf)
7
+ FactoryBot.attributes_for(:shelf)
8
8
  end
9
9
 
10
10
  describe 'GET index', solr: true do
@@ -122,7 +122,7 @@ describe ShelvesController do
122
122
  login_fixture_admin
123
123
 
124
124
  it 'assigns the requested shelf as @shelf' do
125
- shelf = FactoryGirl.create(:shelf)
125
+ shelf = FactoryBot.create(:shelf)
126
126
  get :edit, id: shelf.id
127
127
  assigns(:shelf).should eq(shelf)
128
128
  end
@@ -132,7 +132,7 @@ describe ShelvesController do
132
132
  login_fixture_librarian
133
133
 
134
134
  it 'assigns the requested shelf as @shelf' do
135
- shelf = FactoryGirl.create(:shelf)
135
+ shelf = FactoryBot.create(:shelf)
136
136
  get :edit, id: shelf.id
137
137
  assigns(:shelf).should eq(shelf)
138
138
  end
@@ -142,7 +142,7 @@ describe ShelvesController do
142
142
  login_fixture_user
143
143
 
144
144
  it 'assigns the requested shelf as @shelf' do
145
- shelf = FactoryGirl.create(:shelf)
145
+ shelf = FactoryBot.create(:shelf)
146
146
  get :edit, id: shelf.id
147
147
  response.should be_forbidden
148
148
  end
@@ -150,7 +150,7 @@ describe ShelvesController do
150
150
 
151
151
  describe 'When not logged in' do
152
152
  it 'should not assign the requested shelf as @shelf' do
153
- shelf = FactoryGirl.create(:shelf)
153
+ shelf = FactoryBot.create(:shelf)
154
154
  get :edit, id: shelf.id
155
155
  response.should redirect_to(new_user_session_url)
156
156
  end
@@ -276,7 +276,7 @@ describe ShelvesController do
276
276
 
277
277
  describe 'PUT update' do
278
278
  before(:each) do
279
- @shelf = FactoryGirl.create(:shelf)
279
+ @shelf = FactoryBot.create(:shelf)
280
280
  @attrs = valid_attributes
281
281
  @invalid_attrs = { name: '' }
282
282
  end
@@ -377,7 +377,7 @@ describe ShelvesController do
377
377
 
378
378
  describe 'DELETE destroy' do
379
379
  before(:each) do
380
- @shelf = FactoryGirl.create(:shelf)
380
+ @shelf = FactoryBot.create(:shelf)
381
381
  end
382
382
 
383
383
  describe 'When logged in as Administrator' do
@@ -4,12 +4,12 @@ describe SubscribesController do
4
4
  fixtures :all
5
5
 
6
6
  def valid_attributes
7
- FactoryGirl.attributes_for(:subscribe)
7
+ FactoryBot.attributes_for(:subscribe)
8
8
  end
9
9
 
10
10
  describe 'GET index' do
11
11
  before(:each) do
12
- FactoryGirl.create(:subscribe)
12
+ FactoryBot.create(:subscribe)
13
13
  end
14
14
 
15
15
  describe 'When logged in as Administrator' do
@@ -54,7 +54,7 @@ describe SubscribesController do
54
54
  login_fixture_admin
55
55
 
56
56
  it 'assigns the requested subscribe as @subscribe' do
57
- subscribe = FactoryGirl.create(:subscribe)
57
+ subscribe = FactoryBot.create(:subscribe)
58
58
  get :show, id: subscribe.id
59
59
  assigns(:subscribe).should eq(subscribe)
60
60
  end
@@ -64,7 +64,7 @@ describe SubscribesController do
64
64
  login_fixture_librarian
65
65
 
66
66
  it 'assigns the requested subscribe as @subscribe' do
67
- subscribe = FactoryGirl.create(:subscribe)
67
+ subscribe = FactoryBot.create(:subscribe)
68
68
  get :show, id: subscribe.id
69
69
  assigns(:subscribe).should eq(subscribe)
70
70
  end
@@ -74,7 +74,7 @@ describe SubscribesController do
74
74
  login_fixture_user
75
75
 
76
76
  it 'assigns the requested subscribe as @subscribe' do
77
- subscribe = FactoryGirl.create(:subscribe)
77
+ subscribe = FactoryBot.create(:subscribe)
78
78
  get :show, id: subscribe.id
79
79
  assigns(:subscribe).should eq(subscribe)
80
80
  end
@@ -82,7 +82,7 @@ describe SubscribesController do
82
82
 
83
83
  describe 'When not logged in' do
84
84
  it 'assigns the requested subscribe as @subscribe' do
85
- subscribe = FactoryGirl.create(:subscribe)
85
+ subscribe = FactoryBot.create(:subscribe)
86
86
  get :show, id: subscribe.id
87
87
  assigns(:subscribe).should eq(subscribe)
88
88
  end
@@ -134,7 +134,7 @@ describe SubscribesController do
134
134
  login_fixture_admin
135
135
 
136
136
  it 'assigns the requested subscribe as @subscribe' do
137
- subscribe = FactoryGirl.create(:subscribe)
137
+ subscribe = FactoryBot.create(:subscribe)
138
138
  get :edit, id: subscribe.id
139
139
  assigns(:subscribe).should eq(subscribe)
140
140
  end
@@ -144,7 +144,7 @@ describe SubscribesController do
144
144
  login_fixture_librarian
145
145
 
146
146
  it 'assigns the requested subscribe as @subscribe' do
147
- subscribe = FactoryGirl.create(:subscribe)
147
+ subscribe = FactoryBot.create(:subscribe)
148
148
  get :edit, id: subscribe.id
149
149
  assigns(:subscribe).should eq(subscribe)
150
150
  end
@@ -154,7 +154,7 @@ describe SubscribesController do
154
154
  login_fixture_user
155
155
 
156
156
  it 'assigns the requested subscribe as @subscribe' do
157
- subscribe = FactoryGirl.create(:subscribe)
157
+ subscribe = FactoryBot.create(:subscribe)
158
158
  get :edit, id: subscribe.id
159
159
  response.should be_forbidden
160
160
  end
@@ -162,7 +162,7 @@ describe SubscribesController do
162
162
 
163
163
  describe 'When not logged in' do
164
164
  it 'should not assign the requested subscribe as @subscribe' do
165
- subscribe = FactoryGirl.create(:subscribe)
165
+ subscribe = FactoryBot.create(:subscribe)
166
166
  get :edit, id: subscribe.id
167
167
  response.should redirect_to(new_user_session_url)
168
168
  end
@@ -288,7 +288,7 @@ describe SubscribesController do
288
288
 
289
289
  describe 'PUT update' do
290
290
  before(:each) do
291
- @subscribe = FactoryGirl.create(:subscribe)
291
+ @subscribe = FactoryBot.create(:subscribe)
292
292
  @attrs = valid_attributes
293
293
  @invalid_attrs = { work_id: '' }
294
294
  end
@@ -385,7 +385,7 @@ describe SubscribesController do
385
385
 
386
386
  describe 'DELETE destroy' do
387
387
  before(:each) do
388
- @subscribe = FactoryGirl.create(:subscribe)
388
+ @subscribe = FactoryBot.create(:subscribe)
389
389
  end
390
390
 
391
391
  describe 'When logged in as Administrator' do
@@ -5,7 +5,7 @@ describe SubscriptionsController do
5
5
  fixtures :all
6
6
 
7
7
  def valid_attributes
8
- FactoryGirl.attributes_for(:subscription)
8
+ FactoryBot.attributes_for(:subscription)
9
9
  end
10
10
 
11
11
  describe 'GET index', solr: true do
@@ -53,7 +53,7 @@ describe SubscriptionsController do
53
53
  login_fixture_admin
54
54
 
55
55
  it 'assigns the requested subscription as @subscription' do
56
- subscription = FactoryGirl.create(:subscription)
56
+ subscription = FactoryBot.create(:subscription)
57
57
  get :show, id: subscription.id
58
58
  assigns(:subscription).should eq(subscription)
59
59
  end
@@ -63,7 +63,7 @@ describe SubscriptionsController do
63
63
  login_fixture_librarian
64
64
 
65
65
  it 'assigns the requested subscription as @subscription' do
66
- subscription = FactoryGirl.create(:subscription)
66
+ subscription = FactoryBot.create(:subscription)
67
67
  get :show, id: subscription.id
68
68
  assigns(:subscription).should eq(subscription)
69
69
  end
@@ -73,7 +73,7 @@ describe SubscriptionsController do
73
73
  login_fixture_user
74
74
 
75
75
  it 'assigns the requested subscription as @subscription' do
76
- subscription = FactoryGirl.create(:subscription)
76
+ subscription = FactoryBot.create(:subscription)
77
77
  get :show, id: subscription.id
78
78
  assigns(:subscription).should eq(subscription)
79
79
  end
@@ -81,7 +81,7 @@ describe SubscriptionsController do
81
81
 
82
82
  describe 'When not logged in' do
83
83
  it 'assigns the requested subscription as @subscription' do
84
- subscription = FactoryGirl.create(:subscription)
84
+ subscription = FactoryBot.create(:subscription)
85
85
  get :show, id: subscription.id
86
86
  assigns(:subscription).should eq(subscription)
87
87
  end
@@ -131,7 +131,7 @@ describe SubscriptionsController do
131
131
  login_fixture_admin
132
132
 
133
133
  it 'assigns the requested subscription as @subscription' do
134
- subscription = FactoryGirl.create(:subscription)
134
+ subscription = FactoryBot.create(:subscription)
135
135
  get :edit, id: subscription.id
136
136
  assigns(:subscription).should eq(subscription)
137
137
  end
@@ -141,7 +141,7 @@ describe SubscriptionsController do
141
141
  login_fixture_librarian
142
142
 
143
143
  it 'assigns the requested subscription as @subscription' do
144
- subscription = FactoryGirl.create(:subscription)
144
+ subscription = FactoryBot.create(:subscription)
145
145
  get :edit, id: subscription.id
146
146
  assigns(:subscription).should eq(subscription)
147
147
  end
@@ -151,7 +151,7 @@ describe SubscriptionsController do
151
151
  login_fixture_user
152
152
 
153
153
  it 'assigns the requested subscription as @subscription' do
154
- subscription = FactoryGirl.create(:subscription)
154
+ subscription = FactoryBot.create(:subscription)
155
155
  get :edit, id: subscription.id
156
156
  response.should be_forbidden
157
157
  end
@@ -159,7 +159,7 @@ describe SubscriptionsController do
159
159
 
160
160
  describe 'When not logged in' do
161
161
  it 'should not assign the requested subscription as @subscription' do
162
- subscription = FactoryGirl.create(:subscription)
162
+ subscription = FactoryBot.create(:subscription)
163
163
  get :edit, id: subscription.id
164
164
  response.should redirect_to(new_user_session_url)
165
165
  end
@@ -285,7 +285,7 @@ describe SubscriptionsController do
285
285
 
286
286
  describe 'PUT update' do
287
287
  before(:each) do
288
- @subscription = FactoryGirl.create(:subscription)
288
+ @subscription = FactoryBot.create(:subscription)
289
289
  @attrs = valid_attributes
290
290
  @invalid_attrs = { title: '' }
291
291
  end
@@ -386,7 +386,7 @@ describe SubscriptionsController do
386
386
 
387
387
  describe 'DELETE destroy' do
388
388
  before(:each) do
389
- @subscription = FactoryGirl.create(:subscription)
389
+ @subscription = FactoryBot.create(:subscription)
390
390
  end
391
391
 
392
392
  describe 'When logged in as Administrator' do
@@ -4,12 +4,12 @@ describe UserGroupsController do
4
4
  fixtures :all
5
5
 
6
6
  def valid_attributes
7
- FactoryGirl.attributes_for(:user_group)
7
+ FactoryBot.attributes_for(:user_group)
8
8
  end
9
9
 
10
10
  describe 'GET index' do
11
11
  before(:each) do
12
- FactoryGirl.create(:user_group)
12
+ FactoryBot.create(:user_group)
13
13
  end
14
14
 
15
15
  describe 'When logged in as Administrator' do
@@ -52,7 +52,7 @@ describe UserGroupsController do
52
52
  login_fixture_admin
53
53
 
54
54
  it 'assigns the requested user_group as @user_group' do
55
- user_group = FactoryGirl.create(:user_group)
55
+ user_group = FactoryBot.create(:user_group)
56
56
  get :show, id: user_group.id
57
57
  assigns(:user_group).should eq(user_group)
58
58
  end
@@ -62,7 +62,7 @@ describe UserGroupsController do
62
62
  login_fixture_librarian
63
63
 
64
64
  it 'assigns the requested user_group as @user_group' do
65
- user_group = FactoryGirl.create(:user_group)
65
+ user_group = FactoryBot.create(:user_group)
66
66
  get :show, id: user_group.id
67
67
  assigns(:user_group).should eq(user_group)
68
68
  end
@@ -72,7 +72,7 @@ describe UserGroupsController do
72
72
  login_fixture_user
73
73
 
74
74
  it 'assigns the requested user_group as @user_group' do
75
- user_group = FactoryGirl.create(:user_group)
75
+ user_group = FactoryBot.create(:user_group)
76
76
  get :show, id: user_group.id
77
77
  assigns(:user_group).should eq(user_group)
78
78
  end
@@ -80,7 +80,7 @@ describe UserGroupsController do
80
80
 
81
81
  describe 'When not logged in' do
82
82
  it 'assigns the requested user_group as @user_group' do
83
- user_group = FactoryGirl.create(:user_group)
83
+ user_group = FactoryBot.create(:user_group)
84
84
  get :show, id: user_group.id
85
85
  assigns(:user_group).should eq(user_group)
86
86
  end
@@ -132,7 +132,7 @@ describe UserGroupsController do
132
132
  login_fixture_admin
133
133
 
134
134
  it 'assigns the requested user_group as @user_group' do
135
- user_group = FactoryGirl.create(:user_group)
135
+ user_group = FactoryBot.create(:user_group)
136
136
  get :edit, id: user_group.id
137
137
  assigns(:user_group).should eq(user_group)
138
138
  end
@@ -142,7 +142,7 @@ describe UserGroupsController do
142
142
  login_fixture_librarian
143
143
 
144
144
  it 'assigns the requested user_group as @user_group' do
145
- user_group = FactoryGirl.create(:user_group)
145
+ user_group = FactoryBot.create(:user_group)
146
146
  get :edit, id: user_group.id
147
147
  expect(response).to be_forbidden
148
148
  end
@@ -152,7 +152,7 @@ describe UserGroupsController do
152
152
  login_fixture_user
153
153
 
154
154
  it 'assigns the requested user_group as @user_group' do
155
- user_group = FactoryGirl.create(:user_group)
155
+ user_group = FactoryBot.create(:user_group)
156
156
  get :edit, id: user_group.id
157
157
  expect(response).to be_forbidden
158
158
  end
@@ -160,7 +160,7 @@ describe UserGroupsController do
160
160
 
161
161
  describe 'When not logged in' do
162
162
  it 'should not assign the requested user_group as @user_group' do
163
- user_group = FactoryGirl.create(:user_group)
163
+ user_group = FactoryBot.create(:user_group)
164
164
  get :edit, id: user_group.id
165
165
  expect(response).to redirect_to(new_user_session_url)
166
166
  end
@@ -286,7 +286,7 @@ describe UserGroupsController do
286
286
 
287
287
  describe 'PUT update' do
288
288
  before(:each) do
289
- @user_group = FactoryGirl.create(:user_group)
289
+ @user_group = FactoryBot.create(:user_group)
290
290
  @attrs = valid_attributes
291
291
  @invalid_attrs = { name: '' }
292
292
  end
@@ -387,7 +387,7 @@ describe UserGroupsController do
387
387
 
388
388
  describe 'DELETE destroy' do
389
389
  before(:each) do
390
- @user_group = FactoryGirl.create(:user_group)
390
+ @user_group = FactoryBot.create(:user_group)
391
391
  end
392
392
 
393
393
  describe 'When logged in as Administrator' do
@@ -131,8 +131,8 @@ describe UserImportFilesController do
131
131
  describe 'POST create' do
132
132
  describe 'When logged in as Librarian' do
133
133
  before(:each) do
134
- profile = FactoryGirl.create(:profile)
135
- @user = FactoryGirl.create(:librarian)
134
+ profile = FactoryBot.create(:profile)
135
+ @user = FactoryBot.create(:librarian)
136
136
  @user.profile = profile
137
137
  sign_in @user
138
138
  end
@@ -147,8 +147,8 @@ describe UserImportFilesController do
147
147
 
148
148
  describe 'When logged in as User' do
149
149
  before(:each) do
150
- profile = FactoryGirl.create(:profile)
151
- @user = FactoryGirl.create(:user)
150
+ profile = FactoryBot.create(:profile)
151
+ @user = FactoryBot.create(:user)
152
152
  @user.profile = profile
153
153
  sign_in @user
154
154
  end
@@ -25,7 +25,7 @@ RSpec.describe WithdrawsController, type: :controller do
25
25
  # Withdraw. As you add validations to Withdraw, be sure to
26
26
  # adjust the attributes here as well.
27
27
  let(:valid_attributes) do
28
- FactoryGirl.build(:withdraw).attributes.with_indifferent_access
28
+ FactoryBot.build(:withdraw).attributes.with_indifferent_access
29
29
  end
30
30
  let(:invalid_attributes) do
31
31
  { item_id: nil }
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20171014084528) do
14
+ ActiveRecord::Schema.define(version: 20180102162311) do
15
15
 
16
16
  create_table "accepts", force: :cascade do |t|
17
17
  t.integer "basket_id"
@@ -759,7 +759,7 @@ ActiveRecord::Schema.define(version: 20171014084528) do
759
759
  t.text "display_name"
760
760
  t.string "short_name", null: false
761
761
  t.text "my_networks"
762
- t.text "login_banner"
762
+ t.text "old_login_banner"
763
763
  t.text "note"
764
764
  t.integer "country_id"
765
765
  t.integer "position"
@@ -781,6 +781,7 @@ ActiveRecord::Schema.define(version: 20171014084528) do
781
781
  t.string "header_logo_content_type"
782
782
  t.integer "header_logo_file_size"
783
783
  t.datetime "header_logo_updated_at"
784
+ t.text "header_logo_meta"
784
785
  end
785
786
 
786
787
  add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
@@ -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 :bookstore do |f|
3
3
  f.sequence(:name){|n| "bookstore_#{n}"}
4
4
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :budget_type do |f|
3
3
  f.sequence(:name){|n| "budget_type_#{n}"}
4
4
  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,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,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :library do |f|
3
3
  f.sequence(:name){|n| "library#{n}"}
4
4
  f.sequence(:short_display_name){|n| "library_#{n}"}
@@ -6,7 +6,7 @@ FactoryGirl.define do
6
6
  end
7
7
  end
8
8
 
9
- FactoryGirl.define do
9
+ FactoryBot.define do
10
10
  factory :invalid_library, :class => Library do |f|
11
11
  f.library_group_id{LibraryGroup.first.id}
12
12
  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,10 +1,10 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :profile, :class => Profile do |f|
3
3
  f.user_group_id {UserGroup.first.id}
4
4
  f.required_role_id {Role.where(name: 'User').first.id}
5
5
  f.sequence(:user_number){|n| "user_number_#{n}"}
6
6
  f.library_id 2
7
7
  f.locale "ja"
8
- f.user_id {FactoryGirl.create(:user).id}
8
+ f.user_id {FactoryBot.create(:user).id}
9
9
  end
10
10
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :request_status_type do |f|
3
3
  f.sequence(:name){|n| "request_status_type_#{n}"}
4
4
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :request_type do |f|
3
3
  f.sequence(:name){|n| "request_type_#{n}"}
4
4
  end
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :search_engine do |f|
3
3
  f.sequence(:name){|n| "search_engine_#{n}"}
4
4
  f.sequence(:url){|n| "http://search-engine-#{n}.example.jp"}
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :shelf do |f|
3
3
  f.sequence(:name){|n| "shelf_#{n}"}
4
- f.library_id{FactoryGirl.create(:library).id}
4
+ f.library_id{FactoryBot.create(:library).id}
5
5
  end
6
6
  end
@@ -1,7 +1,7 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :subscribe do |f|
3
- f.subscription_id{FactoryGirl.create(:subscription).id}
4
- f.work_id{FactoryGirl.create(:manifestation).id}
3
+ f.subscription_id{FactoryBot.create(:subscription).id}
4
+ f.work_id{FactoryBot.create(:manifestation).id}
5
5
  f.start_at 1.year.ago
6
6
  f.end_at 1.year.from_now
7
7
  end
@@ -1,6 +1,6 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :subscription do |f|
3
3
  f.sequence(:title){|n| "subscription_#{n}"}
4
- f.user_id{FactoryGirl.create(:user).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 :admin, :class => User do |f|
3
3
  f.sequence(:username){|n| "admin_#{n}"}
4
4
  f.sequence(:email){|n| "admin_#{n}@example.jp"}
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  factory :user_group do |f|
3
3
  f.sequence(:name){|n| "user_group_#{n}"}
4
4
  end
@@ -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 :withdraw do
5
- item_id{FactoryGirl.create(:item).id}
6
- librarian_id{FactoryGirl.create(:librarian).id}
7
- basket_id{FactoryGirl.create(:basket, user_id: librarian_id).id}
5
+ item_id{FactoryBot.create(:item).id}
6
+ librarian_id{FactoryBot.create(:librarian).id}
7
+ basket_id{FactoryBot.create(:basket, user_id: librarian_id).id}
8
8
  end
9
9
  end
10
10
 
@@ -9,7 +9,7 @@ one:
9
9
  ::/0"
10
10
  url: "http://localhost:3000/"
11
11
  position: 1
12
- login_banner: "*Next-L Enju*"
12
+ old_login_banner: "*Next-L Enju*"
13
13
  admin_networks: "0.0.0.0/0\r\n\
14
14
  ::/0"
15
15
  user_id: 1
@@ -24,7 +24,7 @@ one:
24
24
  # display_name :text
25
25
  # short_name :string not null
26
26
  # my_networks :text
27
- # login_banner :text
27
+ # old_login_banner :text
28
28
  # note :text
29
29
  # country_id :integer
30
30
  # position :integer
@@ -41,4 +41,10 @@ one:
41
41
  # screenshot_generator :string
42
42
  # pub_year_facet_range_interval :integer default(10)
43
43
  # user_id :integer
44
+ # csv_charset_conversion :boolean default(FALSE), not null
45
+ # header_logo_file_name :string
46
+ # header_logo_content_type :string
47
+ # header_logo_file_size :integer
48
+ # header_logo_updated_at :datetime
49
+ # header_logo_meta :text
44
50
  #
@@ -4,7 +4,7 @@ describe Accept do
4
4
  fixtures :all
5
5
 
6
6
  it "should change circulation_status" do
7
- accept = FactoryGirl.create(:accept)
7
+ accept = FactoryBot.create(:accept)
8
8
  accept.item.circulation_status.name.should eq 'Available On Shelf'
9
9
  accept.item.use_restriction.name.should eq 'Limited Circulation, Normal Loan Period'
10
10
  end
@@ -3,7 +3,7 @@ require 'rails_helper'
3
3
 
4
4
  describe BudgetType do
5
5
  it 'should create budget_type' do
6
- FactoryGirl.create(:budget_type)
6
+ FactoryBot.create(:budget_type)
7
7
  end
8
8
  end
9
9
 
@@ -24,7 +24,7 @@ end
24
24
  # display_name :text
25
25
  # short_name :string not null
26
26
  # my_networks :text
27
- # login_banner :text
27
+ # old_login_banner :text
28
28
  # note :text
29
29
  # country_id :integer
30
30
  # position :integer
@@ -41,4 +41,10 @@ end
41
41
  # screenshot_generator :string
42
42
  # pub_year_facet_range_interval :integer default(10)
43
43
  # user_id :integer
44
+ # csv_charset_conversion :boolean default(FALSE), not null
45
+ # header_logo_file_name :string
46
+ # header_logo_content_type :string
47
+ # header_logo_file_size :integer
48
+ # header_logo_updated_at :datetime
49
+ # header_logo_meta :text
44
50
  #