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