mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Uncomments preferences
Moves I18n exception handler within base spec helper
This commit is contained in:
@@ -24,28 +24,28 @@ class ContentConfiguration < Spree::Preferences::Configuration
|
||||
# All the following defaults using I18n don't work.
|
||||
# https://github.com/openfoodfoundation/openfoodnetwork/issues/3816
|
||||
# default values for these fields are commented out below
|
||||
preference :producer_signup_pricing_table_html, :text
|
||||
# default: I18n.t(:content_configuration_pricing_table)
|
||||
preference :producer_signup_case_studies_html, :text
|
||||
# default: I18n.t(:content_configuration_case_studies)
|
||||
preference :producer_signup_detail_html, :text
|
||||
# default: I18n.t(:content_configuration_detail)
|
||||
preference :producer_signup_pricing_table_html, :text,
|
||||
default: I18n.t(:content_configuration_pricing_table)
|
||||
preference :producer_signup_case_studies_html, :text,
|
||||
default: I18n.t(:content_configuration_case_studies)
|
||||
preference :producer_signup_detail_html, :text,
|
||||
default: I18n.t(:content_configuration_detail)
|
||||
|
||||
# Hubs sign-up page
|
||||
preference :hub_signup_pricing_table_html, :text
|
||||
# default: I18n.t(:content_configuration_pricing_table)
|
||||
preference :hub_signup_case_studies_html, :text
|
||||
# default: I18n.t(:content_configuration_case_studies)
|
||||
preference :hub_signup_detail_html, :text
|
||||
# default: I18n.t(:content_configuration_detail)
|
||||
preference :hub_signup_pricing_table_html, :text,
|
||||
default: I18n.t(:content_configuration_pricing_table)
|
||||
preference :hub_signup_case_studies_html, :text,
|
||||
default: I18n.t(:content_configuration_case_studies)
|
||||
preference :hub_signup_detail_html, :text,
|
||||
default: I18n.t(:content_configuration_detail)
|
||||
|
||||
# Groups sign-up page
|
||||
preference :group_signup_pricing_table_html, :text
|
||||
# default: I18n.t(:content_configuration_pricing_table)
|
||||
preference :group_signup_case_studies_html, :text
|
||||
# default: I18n.t(:content_configuration_case_studies)
|
||||
preference :group_signup_detail_html, :text
|
||||
# default: I18n.t(:content_configuration_detail)
|
||||
preference :group_signup_pricing_table_html, :text,
|
||||
default: I18n.t(:content_configuration_pricing_table)
|
||||
preference :group_signup_case_studies_html, :text,
|
||||
default: I18n.t(:content_configuration_case_studies)
|
||||
preference :group_signup_detail_html, :text,
|
||||
default: I18n.t(:content_configuration_detail)
|
||||
|
||||
# Main URLs
|
||||
preference :menu_1, :boolean, default: true
|
||||
|
||||
@@ -50,6 +50,11 @@ end
|
||||
FactoryBot.use_parent_strategy = false
|
||||
FactoryBot::SyntaxRunner.include FileHelper
|
||||
|
||||
# raise I18n exception handler
|
||||
I18n.exception_handler = proc do |exception, *_|
|
||||
raise exception.to_exception
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
||||
config.fixture_path = "#{Rails.root.join('spec/fixtures')}"
|
||||
@@ -205,11 +210,6 @@ RSpec.configure do |config|
|
||||
# You can use `rspec -n` to run only failed specs.
|
||||
config.example_status_persistence_file_path = "tmp/rspec-status.txt"
|
||||
|
||||
# raise I18n exception handler
|
||||
I18n.exception_handler = proc do |exception, *_|
|
||||
raise exception.to_exception
|
||||
end
|
||||
|
||||
# Helpers
|
||||
config.include FactoryBot::Syntax::Methods
|
||||
config.include JsonSpec::Helpers
|
||||
|
||||
Reference in New Issue
Block a user