diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 842511056..edd5b39a1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -184,7 +184,7 @@ module ApplicationHelper release_footprint = ApplicationConfig["RELEASE_FOOTPRINT"] return path if release_footprint.blank? - "#{path}-#{release_footprint}" + "#{path}-#{params[:locale]}-#{release_footprint}" end def copyright_notice diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 8f46c3675..caddc6399 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -43,7 +43,13 @@ RSpec.describe ApplicationHelper, type: :helper do it "appends the RELEASE_FOOTPRINT if it is set" do allow(ApplicationConfig).to receive(:[]).with("RELEASE_FOOTPRINT").and_return("abc123") - expect(helper.release_adjusted_cache_key("cache-me")).to eq("cache-me-abc123") + expect(helper.release_adjusted_cache_key("cache-me")).to eq("cache-me--abc123") + end + + it "includes locale param if it is set" do + allow(ApplicationConfig).to receive(:[]).with("RELEASE_FOOTPRINT").and_return("abc123") + params[:locale] = "fr-ca" + expect(helper.release_adjusted_cache_key("cache-me")).to eq("cache-me-fr-ca-abc123") end end