From ac55c25b7738bde1db2f91ffcdbfe818ae89b38b Mon Sep 17 00:00:00 2001 From: Ian James Date: Mon, 23 Nov 2020 16:20:16 +0000 Subject: [PATCH] fix test --- .../components/shared_helper_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lib/govuk_publishing_components/components/shared_helper_spec.rb b/spec/lib/govuk_publishing_components/components/shared_helper_spec.rb index c00b4acb06..9d848547d9 100644 --- a/spec/lib/govuk_publishing_components/components/shared_helper_spec.rb +++ b/spec/lib/govuk_publishing_components/components/shared_helper_spec.rb @@ -98,13 +98,13 @@ expect(shared_helper.t_locale(translation_key)).to eq :en end - it "returns no locale if translation is present" do + it "returns no locale if translation is present and using default locale" do I18n.locale = :fr translation_key = "components.contents_list.contents" shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new({}) - expect(shared_helper.t_locale(translation_key)).to be nil + expect(shared_helper.t_locale(translation_key)).to be :fr end end end