enju_library 0.4.0.beta.4 → 0.4.0.rc.1
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/controllers/library_groups_controller.rb +1 -4
- data/app/helpers/enju_library/application_helper.rb +2 -2
- data/app/mailers/notifier.rb +2 -2
- data/app/mailers/user_export_mailer.rb +2 -2
- data/app/mailers/user_import_mailer.rb +2 -2
- data/app/models/accept.rb +6 -6
- data/app/models/basket.rb +4 -4
- data/app/models/bookstore.rb +3 -4
- data/app/models/budget_type.rb +3 -3
- data/app/models/color.rb +4 -4
- data/app/models/concerns/enju_library/enju_user.rb +62 -0
- data/app/models/library.rb +5 -6
- data/app/models/library_group.rb +5 -4
- data/app/models/request_status_type.rb +3 -3
- data/app/models/request_type.rb +3 -3
- data/app/models/search_engine.rb +3 -3
- data/app/models/shelf.rb +5 -6
- data/app/models/subscribe.rb +4 -4
- data/app/models/subscription.rb +5 -6
- data/app/models/user_export_file.rb +14 -20
- data/app/models/user_export_file_state_machine.rb +1 -1
- data/app/models/user_export_file_transition.rb +4 -4
- data/app/models/user_group.rb +3 -4
- data/app/models/user_import_file.rb +13 -21
- data/app/models/user_import_file_state_machine.rb +1 -1
- data/app/models/user_import_file_transition.rb +4 -4
- data/app/models/user_import_result.rb +5 -5
- data/app/models/withdraw.rb +4 -10
- data/app/policies/shelf_policy.rb +1 -1
- data/app/views/layouts/libraries.html.erb +31 -0
- data/app/views/libraries/_map.html.erb +8 -24
- data/app/views/libraries/_map_header.html.erb +6 -0
- data/app/views/library_groups/_form.html.erb +1 -3
- data/app/views/library_groups/show.html.erb +1 -1
- data/app/views/user_groups/show.html.erb +5 -3
- data/app/views/user_import_files/_results.html.erb +5 -0
- data/app/views/user_import_results/index.html.erb +0 -11
- data/db/migrate/059_create_libraries.rb +1 -2
- data/db/migrate/069_create_shelves.rb +1 -2
- data/db/migrate/077_create_user_groups.rb +1 -2
- data/db/migrate/080_create_library_groups.rb +1 -1
- data/db/migrate/120_create_baskets.rb +1 -1
- data/db/migrate/124_create_bookstores.rb +1 -2
- data/db/migrate/130_create_request_status_types.rb +1 -1
- data/db/migrate/131_create_request_types.rb +1 -1
- data/db/migrate/20081006090811_create_subscriptions.rb +1 -2
- data/db/migrate/20081006093246_create_subscribes.rb +1 -1
- data/db/migrate/20081023092436_create_search_engines.rb +1 -1
- data/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
- data/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
- data/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
- data/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
- data/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
- data/db/migrate/20120129014038_create_budget_types.rb +1 -1
- data/db/migrate/20120319173203_create_accepts.rb +1 -1
- data/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
- data/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
- data/db/migrate/20140110122216_create_user_import_files.rb +1 -1
- data/db/migrate/20140110131010_create_user_import_results.rb +1 -1
- data/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
- data/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
- data/db/migrate/20140709113413_create_user_export_files.rb +1 -1
- data/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
- data/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
- data/db/migrate/20140821151023_create_colors.rb +1 -1
- data/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
- data/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
- data/db/migrate/20150924115059_create_withdraws.rb +1 -1
- data/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
- data/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
- data/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
- data/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
- data/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
- data/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
- data/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
- data/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
- data/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
- data/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
- data/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
- data/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
- data/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
- data/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
- data/db/migrate/20191216131755_add_email_to_library_group.rb +6 -0
- data/lib/enju_library/version.rb +1 -1
- data/lib/generators/enju_library/setup/setup_generator.rb +4 -3
- data/lib/generators/enju_library/setup/templates/db/fixtures/library_groups.yml +2 -2
- data/lib/generators/enju_library/setup/templates/db/fixtures/search_engines.yml +9 -0
- data/spec/dummy/app/assets/config/manifest.js +2 -0
- data/spec/dummy/app/controllers/application_controller.rb +0 -1
- data/spec/dummy/app/models/user.rb +0 -2
- data/spec/dummy/config/initializers/assets.rb +1 -1
- data/spec/dummy/db/migrate/001_create_agents.rb +0 -1
- data/spec/dummy/db/migrate/005_create_manifestations.rb +0 -1
- data/spec/dummy/db/migrate/006_create_items.rb +0 -1
- data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
- data/spec/dummy/db/schema.rb +98 -90
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/postcss.config.js +12 -0
- data/spec/factories/accepts.rb +6 -6
- data/spec/factories/budget_types.rb +3 -3
- data/spec/fixtures/baskets.yml +4 -4
- data/spec/fixtures/bookstores.yml +3 -11
- data/spec/fixtures/budget_types.yml +3 -3
- data/spec/fixtures/colors.yml +4 -4
- data/spec/fixtures/events.yml +0 -9
- data/spec/fixtures/libraries.yml +5 -6
- data/spec/fixtures/library_groups.yml +6 -5
- data/spec/fixtures/request_status_types.yml +3 -3
- data/spec/fixtures/request_types.yml +3 -3
- data/spec/fixtures/search_engines.yml +3 -3
- data/spec/fixtures/shelves.yml +4 -5
- data/spec/fixtures/subscribes.yml +4 -4
- data/spec/fixtures/subscriptions.yml +5 -6
- data/spec/fixtures/user_export_files.yml +4 -4
- data/spec/fixtures/user_groups.yml +3 -4
- data/spec/fixtures/user_import_files.yml +6 -6
- data/spec/fixtures/user_import_results.yml +5 -5
- data/spec/fixtures/withdraws.yml +4 -4
- data/spec/models/accept_spec.rb +6 -6
- data/spec/models/basket_spec.rb +4 -4
- data/spec/models/bookstore_spec.rb +3 -4
- data/spec/models/budget_type_spec.rb +3 -3
- data/spec/models/library_group_spec.rb +5 -4
- data/spec/models/library_spec.rb +5 -6
- data/spec/models/request_status_type_spec.rb +3 -3
- data/spec/models/request_type_spec.rb +3 -3
- data/spec/models/search_engine_spec.rb +3 -3
- data/spec/models/shelf_spec.rb +4 -5
- data/spec/models/subscribe_spec.rb +4 -4
- data/spec/models/subscription_spec.rb +5 -6
- data/spec/models/user_export_file_spec.rb +4 -4
- data/spec/models/user_group_spec.rb +3 -4
- data/spec/models/user_import_file_spec.rb +8 -8
- data/spec/models/user_import_result_spec.rb +5 -5
- data/spec/models/withdraw_spec.rb +4 -4
- data/spec/system/libraries_spec.rb +5 -5
- data/spec/system/user_groups_spec.rb +46 -0
- metadata +32 -18
@@ -30,8 +30,8 @@ two:
|
|
30
30
|
#
|
31
31
|
# Table name: user_import_files
|
32
32
|
#
|
33
|
-
# id :
|
34
|
-
# user_id :
|
33
|
+
# id :bigint not null, primary key
|
34
|
+
# user_id :bigint
|
35
35
|
# note :text
|
36
36
|
# executed_at :datetime
|
37
37
|
# user_import_file_name :string
|
@@ -41,9 +41,9 @@ two:
|
|
41
41
|
# user_import_fingerprint :string
|
42
42
|
# edit_mode :string
|
43
43
|
# error_message :text
|
44
|
-
# created_at :datetime
|
45
|
-
# updated_at :datetime
|
44
|
+
# created_at :datetime not null
|
45
|
+
# updated_at :datetime not null
|
46
46
|
# user_encoding :string
|
47
|
-
# default_library_id :
|
48
|
-
# default_user_group_id :
|
47
|
+
# default_library_id :bigint
|
48
|
+
# default_user_group_id :bigint
|
49
49
|
#
|
@@ -16,11 +16,11 @@ two:
|
|
16
16
|
#
|
17
17
|
# Table name: user_import_results
|
18
18
|
#
|
19
|
-
# id :
|
20
|
-
# user_import_file_id :
|
21
|
-
# user_id :
|
19
|
+
# id :bigint not null, primary key
|
20
|
+
# user_import_file_id :bigint
|
21
|
+
# user_id :bigint
|
22
22
|
# body :text
|
23
|
-
# created_at :datetime
|
24
|
-
# updated_at :datetime
|
23
|
+
# created_at :datetime not null
|
24
|
+
# updated_at :datetime not null
|
25
25
|
# error_message :text
|
26
26
|
#
|
data/spec/fixtures/withdraws.yml
CHANGED
@@ -11,10 +11,10 @@ withdraws_00001:
|
|
11
11
|
#
|
12
12
|
# Table name: withdraws
|
13
13
|
#
|
14
|
-
# id :
|
15
|
-
# basket_id :
|
16
|
-
# item_id :
|
17
|
-
# librarian_id :
|
14
|
+
# id :bigint not null, primary key
|
15
|
+
# basket_id :bigint
|
16
|
+
# item_id :bigint
|
17
|
+
# librarian_id :bigint
|
18
18
|
# created_at :datetime not null
|
19
19
|
# updated_at :datetime not null
|
20
20
|
#
|
data/spec/models/accept_spec.rb
CHANGED
@@ -12,10 +12,10 @@ end
|
|
12
12
|
#
|
13
13
|
# Table name: accepts
|
14
14
|
#
|
15
|
-
# id :
|
16
|
-
# basket_id :
|
17
|
-
# item_id :
|
18
|
-
# librarian_id :
|
19
|
-
# created_at :datetime
|
20
|
-
# updated_at :datetime
|
15
|
+
# id :bigint not null, primary key
|
16
|
+
# basket_id :bigint
|
17
|
+
# item_id :bigint
|
18
|
+
# librarian_id :bigint
|
19
|
+
# created_at :datetime not null
|
20
|
+
# updated_at :datetime not null
|
21
21
|
#
|
data/spec/models/basket_spec.rb
CHANGED
@@ -14,10 +14,10 @@ end
|
|
14
14
|
#
|
15
15
|
# Table name: baskets
|
16
16
|
#
|
17
|
-
# id :
|
18
|
-
# user_id :
|
17
|
+
# id :bigint not null, primary key
|
18
|
+
# user_id :bigint
|
19
19
|
# note :text
|
20
20
|
# lock_version :integer default(0), not null
|
21
|
-
# created_at :datetime
|
22
|
-
# updated_at :datetime
|
21
|
+
# created_at :datetime not null
|
22
|
+
# updated_at :datetime not null
|
23
23
|
#
|
@@ -9,7 +9,7 @@ end
|
|
9
9
|
#
|
10
10
|
# Table name: bookstores
|
11
11
|
#
|
12
|
-
# id :
|
12
|
+
# id :bigint not null, primary key
|
13
13
|
# name :text not null
|
14
14
|
# zip_code :string
|
15
15
|
# address :text
|
@@ -18,7 +18,6 @@ end
|
|
18
18
|
# fax_number :string
|
19
19
|
# url :string
|
20
20
|
# position :integer
|
21
|
-
#
|
22
|
-
#
|
23
|
-
# updated_at :datetime
|
21
|
+
# created_at :datetime not null
|
22
|
+
# updated_at :datetime not null
|
24
23
|
#
|
@@ -11,12 +11,12 @@ end
|
|
11
11
|
#
|
12
12
|
# Table name: budget_types
|
13
13
|
#
|
14
|
-
# id :
|
14
|
+
# id :bigint not null, primary key
|
15
15
|
# name :string
|
16
16
|
# display_name :text
|
17
17
|
# note :text
|
18
18
|
# position :integer
|
19
|
-
# created_at :datetime
|
20
|
-
# updated_at :datetime
|
19
|
+
# created_at :datetime not null
|
20
|
+
# updated_at :datetime not null
|
21
21
|
# display_name_translations :jsonb not null
|
22
22
|
#
|
@@ -18,7 +18,7 @@ end
|
|
18
18
|
#
|
19
19
|
# Table name: library_groups
|
20
20
|
#
|
21
|
-
# id :
|
21
|
+
# id :bigint not null, primary key
|
22
22
|
# name :string not null
|
23
23
|
# display_name :text
|
24
24
|
# short_name :string not null
|
@@ -27,8 +27,8 @@ end
|
|
27
27
|
# note :text
|
28
28
|
# country_id :integer
|
29
29
|
# position :integer
|
30
|
-
# created_at :datetime
|
31
|
-
# updated_at :datetime
|
30
|
+
# created_at :datetime not null
|
31
|
+
# updated_at :datetime not null
|
32
32
|
# admin_networks :text
|
33
33
|
# allow_bookmark_external_url :boolean default(FALSE), not null
|
34
34
|
# url :string default("http://localhost:3000/")
|
@@ -39,7 +39,7 @@ end
|
|
39
39
|
# family_name_first :boolean default(TRUE)
|
40
40
|
# screenshot_generator :string
|
41
41
|
# pub_year_facet_range_interval :integer default(10)
|
42
|
-
# user_id :
|
42
|
+
# user_id :bigint
|
43
43
|
# csv_charset_conversion :boolean default(FALSE), not null
|
44
44
|
# header_logo_file_name :string
|
45
45
|
# header_logo_content_type :string
|
@@ -49,4 +49,5 @@ end
|
|
49
49
|
# display_name_translations :jsonb not null
|
50
50
|
# login_banner_translations :jsonb not null
|
51
51
|
# footer_banner_translations :jsonb not null
|
52
|
+
# email :string
|
52
53
|
#
|
data/spec/models/library_spec.rb
CHANGED
@@ -17,7 +17,7 @@ end
|
|
17
17
|
#
|
18
18
|
# Table name: libraries
|
19
19
|
#
|
20
|
-
# id :
|
20
|
+
# id :bigint not null, primary key
|
21
21
|
# name :string not null
|
22
22
|
# display_name :text
|
23
23
|
# short_display_name :string not null
|
@@ -31,13 +31,12 @@ end
|
|
31
31
|
# note :text
|
32
32
|
# call_number_rows :integer default(1), not null
|
33
33
|
# call_number_delimiter :string default("|"), not null
|
34
|
-
# library_group_id :
|
34
|
+
# library_group_id :bigint not null
|
35
35
|
# users_count :integer default(0), not null
|
36
36
|
# position :integer
|
37
|
-
# country_id :
|
38
|
-
# created_at :datetime
|
39
|
-
# updated_at :datetime
|
40
|
-
# deleted_at :datetime
|
37
|
+
# country_id :bigint
|
38
|
+
# created_at :datetime not null
|
39
|
+
# updated_at :datetime not null
|
41
40
|
# opening_hour :text
|
42
41
|
# isil :string
|
43
42
|
# latitude :float
|
@@ -9,12 +9,12 @@ end
|
|
9
9
|
#
|
10
10
|
# Table name: request_status_types
|
11
11
|
#
|
12
|
-
# id :
|
12
|
+
# id :bigint not null, primary key
|
13
13
|
# name :string not null
|
14
14
|
# display_name :text
|
15
15
|
# note :text
|
16
16
|
# position :integer
|
17
|
-
# created_at :datetime
|
18
|
-
# updated_at :datetime
|
17
|
+
# created_at :datetime not null
|
18
|
+
# updated_at :datetime not null
|
19
19
|
# display_name_translations :jsonb not null
|
20
20
|
#
|
@@ -9,12 +9,12 @@ end
|
|
9
9
|
#
|
10
10
|
# Table name: request_types
|
11
11
|
#
|
12
|
-
# id :
|
12
|
+
# id :bigint not null, primary key
|
13
13
|
# name :string not null
|
14
14
|
# display_name :text
|
15
15
|
# note :text
|
16
16
|
# position :integer
|
17
|
-
# created_at :datetime
|
18
|
-
# updated_at :datetime
|
17
|
+
# created_at :datetime not null
|
18
|
+
# updated_at :datetime not null
|
19
19
|
# display_name_translations :jsonb not null
|
20
20
|
#
|
@@ -12,7 +12,7 @@ end
|
|
12
12
|
#
|
13
13
|
# Table name: search_engines
|
14
14
|
#
|
15
|
-
# id :
|
15
|
+
# id :bigint not null, primary key
|
16
16
|
# name :string not null
|
17
17
|
# display_name :text
|
18
18
|
# url :string not null
|
@@ -22,7 +22,7 @@ end
|
|
22
22
|
# additional_param :text
|
23
23
|
# note :text
|
24
24
|
# position :integer
|
25
|
-
# created_at :datetime
|
26
|
-
# updated_at :datetime
|
25
|
+
# created_at :datetime not null
|
26
|
+
# updated_at :datetime not null
|
27
27
|
# display_name_translations :jsonb not null
|
28
28
|
#
|
data/spec/models/shelf_spec.rb
CHANGED
@@ -13,16 +13,15 @@ end
|
|
13
13
|
#
|
14
14
|
# Table name: shelves
|
15
15
|
#
|
16
|
-
# id :
|
16
|
+
# id :bigint not null, primary key
|
17
17
|
# name :string not null
|
18
18
|
# display_name :text
|
19
19
|
# note :text
|
20
|
-
# library_id :
|
20
|
+
# library_id :bigint not null
|
21
21
|
# items_count :integer default(0), not null
|
22
22
|
# position :integer
|
23
|
-
# created_at :datetime
|
24
|
-
# updated_at :datetime
|
25
|
-
# deleted_at :datetime
|
23
|
+
# created_at :datetime not null
|
24
|
+
# updated_at :datetime not null
|
26
25
|
# closed :boolean default(FALSE), not null
|
27
26
|
# display_name_translations :jsonb not null
|
28
27
|
#
|
@@ -9,11 +9,11 @@ end
|
|
9
9
|
#
|
10
10
|
# Table name: subscribes
|
11
11
|
#
|
12
|
-
# id :
|
13
|
-
# subscription_id :
|
12
|
+
# id :bigint not null, primary key
|
13
|
+
# subscription_id :bigint not null
|
14
14
|
# work_id :integer not null
|
15
15
|
# start_at :datetime not null
|
16
16
|
# end_at :datetime not null
|
17
|
-
# created_at :datetime
|
18
|
-
# updated_at :datetime
|
17
|
+
# created_at :datetime not null
|
18
|
+
# updated_at :datetime not null
|
19
19
|
#
|
@@ -13,13 +13,12 @@ end
|
|
13
13
|
#
|
14
14
|
# Table name: subscriptions
|
15
15
|
#
|
16
|
-
# id :
|
16
|
+
# id :bigint not null, primary key
|
17
17
|
# title :text not null
|
18
18
|
# note :text
|
19
|
-
# user_id :
|
20
|
-
# order_list_id :
|
21
|
-
# deleted_at :datetime
|
19
|
+
# user_id :bigint
|
20
|
+
# order_list_id :bigint
|
22
21
|
# subscribes_count :integer default(0), not null
|
23
|
-
# created_at :datetime
|
24
|
-
# updated_at :datetime
|
22
|
+
# created_at :datetime not null
|
23
|
+
# updated_at :datetime not null
|
25
24
|
#
|
@@ -17,13 +17,13 @@ end
|
|
17
17
|
#
|
18
18
|
# Table name: user_export_files
|
19
19
|
#
|
20
|
-
# id :
|
21
|
-
# user_id :
|
20
|
+
# id :bigint not null, primary key
|
21
|
+
# user_id :bigint
|
22
22
|
# user_export_file_name :string
|
23
23
|
# user_export_content_type :string
|
24
24
|
# user_export_file_size :bigint
|
25
25
|
# user_export_updated_at :datetime
|
26
26
|
# executed_at :datetime
|
27
|
-
# created_at :datetime
|
28
|
-
# updated_at :datetime
|
27
|
+
# created_at :datetime not null
|
28
|
+
# updated_at :datetime not null
|
29
29
|
#
|
@@ -14,14 +14,13 @@ end
|
|
14
14
|
#
|
15
15
|
# Table name: user_groups
|
16
16
|
#
|
17
|
-
# id :
|
17
|
+
# id :bigint not null, primary key
|
18
18
|
# name :string
|
19
19
|
# display_name :text
|
20
20
|
# note :text
|
21
21
|
# position :integer
|
22
|
-
# created_at :datetime
|
23
|
-
# updated_at :datetime
|
24
|
-
# deleted_at :datetime
|
22
|
+
# created_at :datetime not null
|
23
|
+
# updated_at :datetime not null
|
25
24
|
# valid_period_for_new_user :integer default(0), not null
|
26
25
|
# expired_at :datetime
|
27
26
|
# number_of_day_to_notify_overdue :integer default(7), not null
|
@@ -21,7 +21,7 @@ describe UserImportFile do
|
|
21
21
|
old_users_count = User.count
|
22
22
|
old_import_results_count = UserImportResult.count
|
23
23
|
file.current_state.should eq 'pending'
|
24
|
-
file.import_start.should eq({user_imported: 5, user_found: 0, error: 3})
|
24
|
+
file.import_start.should eq({user_imported: 5, user_found: 0, failed: 0, error: 3})
|
25
25
|
User.order('id DESC')[1].username.should eq 'user005'
|
26
26
|
User.order('id DESC')[2].username.should eq 'user003'
|
27
27
|
User.count.should eq old_users_count + 5
|
@@ -91,7 +91,7 @@ describe UserImportFile do
|
|
91
91
|
old_users_count = User.count
|
92
92
|
old_import_results_count = UserImportResult.count
|
93
93
|
@file.user = User.find_by(username: 'librarian1')
|
94
|
-
@file.import_start.should eq({user_imported: 5, user_found: 0, error: 3})
|
94
|
+
@file.import_start.should eq({user_imported: 5, user_found: 0, failed: 0, error: 3})
|
95
95
|
User.order('id DESC')[1].username.should eq 'user005'
|
96
96
|
User.count.should eq old_users_count + 5
|
97
97
|
UserImportResult.count.should eq old_import_results_count + 10
|
@@ -216,8 +216,8 @@ end
|
|
216
216
|
#
|
217
217
|
# Table name: user_import_files
|
218
218
|
#
|
219
|
-
# id :
|
220
|
-
# user_id :
|
219
|
+
# id :bigint not null, primary key
|
220
|
+
# user_id :bigint
|
221
221
|
# note :text
|
222
222
|
# executed_at :datetime
|
223
223
|
# user_import_file_name :string
|
@@ -227,9 +227,9 @@ end
|
|
227
227
|
# user_import_fingerprint :string
|
228
228
|
# edit_mode :string
|
229
229
|
# error_message :text
|
230
|
-
# created_at :datetime
|
231
|
-
# updated_at :datetime
|
230
|
+
# created_at :datetime not null
|
231
|
+
# updated_at :datetime not null
|
232
232
|
# user_encoding :string
|
233
|
-
# default_library_id :
|
234
|
-
# default_user_group_id :
|
233
|
+
# default_library_id :bigint
|
234
|
+
# default_user_group_id :bigint
|
235
235
|
#
|
@@ -9,11 +9,11 @@ end
|
|
9
9
|
#
|
10
10
|
# Table name: user_import_results
|
11
11
|
#
|
12
|
-
# id :
|
13
|
-
# user_import_file_id :
|
14
|
-
# user_id :
|
12
|
+
# id :bigint not null, primary key
|
13
|
+
# user_import_file_id :bigint
|
14
|
+
# user_id :bigint
|
15
15
|
# body :text
|
16
|
-
# created_at :datetime
|
17
|
-
# updated_at :datetime
|
16
|
+
# created_at :datetime not null
|
17
|
+
# updated_at :datetime not null
|
18
18
|
# error_message :text
|
19
19
|
#
|
@@ -12,10 +12,10 @@ end
|
|
12
12
|
#
|
13
13
|
# Table name: withdraws
|
14
14
|
#
|
15
|
-
# id :
|
16
|
-
# basket_id :
|
17
|
-
# item_id :
|
18
|
-
# librarian_id :
|
15
|
+
# id :bigint not null, primary key
|
16
|
+
# basket_id :bigint
|
17
|
+
# item_id :bigint
|
18
|
+
# librarian_id :bigint
|
19
19
|
# created_at :datetime not null
|
20
20
|
# updated_at :datetime not null
|
21
21
|
#
|
@@ -9,7 +9,7 @@ RSpec.describe 'Libraries', type: :system do
|
|
9
9
|
sign_in users(:admin)
|
10
10
|
end
|
11
11
|
|
12
|
-
|
12
|
+
xit 'should show library config' do
|
13
13
|
visit library_path(libraries(:library_00002).id, locale: :ja)
|
14
14
|
expect(page).to have_content '設定'
|
15
15
|
end
|
@@ -20,9 +20,9 @@ RSpec.describe 'Libraries', type: :system do
|
|
20
20
|
sign_in users(:librarian1)
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
xit 'should not show library config' do
|
24
24
|
visit library_path(libraries(:library_00002).id, locale: :ja)
|
25
|
-
expect(page).not_to
|
25
|
+
expect(page).not_to have_link '設定'
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -33,14 +33,14 @@ RSpec.describe 'Libraries', type: :system do
|
|
33
33
|
|
34
34
|
it 'should not show library config' do
|
35
35
|
visit library_path(libraries(:library_00002).id, locale: :ja)
|
36
|
-
expect(page).not_to
|
36
|
+
expect(page).not_to have_link '設定'
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
40
|
describe 'When not logged in' do
|
41
41
|
it 'should not show library config' do
|
42
42
|
visit library_path(libraries(:library_00002).id, locale: :ja)
|
43
|
-
expect(page).not_to
|
43
|
+
expect(page).not_to have_link '設定'
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|