Uncomments preferences

Moves I18n exception handler within base spec helper
This commit is contained in:
filipefurtad0
2023-12-20 11:09:47 +00:00
parent cdceefb6fb
commit 8891091ebb
2 changed files with 23 additions and 23 deletions

View File

@@ -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

View File

@@ -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