From c87ae5576be6c3e2bd109c4f07c10b7b8ea2a556 Mon Sep 17 00:00:00 2001 From: aaronskiba Date: Mon, 28 Oct 2024 16:14:39 -0600 Subject: [PATCH] Fix tests: Set `default_locale` to 'en' This change resolves the following error: ``` rspec ./spec/features/modal_search_spec.rb:25 1) ModalSearchDialog Modal search opens and closes and allows user to search, select and remove items Failure/Error: <%= l(plan.updated_at.to_date, formats: :short) %> ActionView::Template::Error: Translation missing: en-GB.date.formats.default ``` Because en-GB is not a locale used within DMP Assistant, commit f600ba084b741dba0acc484224d4017f0a5b4bae removed the related en-GB files from the app. Setting the locale to 'en-CA' unfortunately breaks the tests as well. There is an open issue that seeks to resolve this: https://github.com/portagenetwork/roadmap/issues/931 --- spec/support/locales.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/locales.rb b/spec/support/locales.rb index 449dad075b..a2f967d66f 100644 --- a/spec/support/locales.rb +++ b/spec/support/locales.rb @@ -2,7 +2,7 @@ require 'shoulda/matchers' -AVAILABLE_TEST_LOCALES = %w[en-GB en fr de].freeze +AVAILABLE_TEST_LOCALES = %w[en fr de].freeze RSpec.configure do |config| config.before(:suite) do