Commit 34e5dfe4 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix/project-list-cache-key' into 'master'

Fix projects list to show info in user's locale

Closes #31681

See merge request gitlab-org/gitlab!20015
parents d2320457 12ee65ae
......@@ -188,6 +188,7 @@ module ProjectsHelper
"cross-project:#{can?(current_user, :read_cross_project)}",
max_project_member_access_cache_key(project),
pipeline_status,
Gitlab::I18n.locale,
'v2.6'
]
......
---
title: Fix projects list to show info in user's locale
merge_request: 20015
author: Arun Kumar Mohan
type: fixed
......@@ -157,6 +157,7 @@ describe ProjectsHelper do
allow(helper).to receive(:current_user).and_return(user)
allow(helper).to receive(:can?).with(user, :read_cross_project) { true }
allow(user).to receive(:max_member_access_for_project).and_return(40)
allow(Gitlab::I18n).to receive(:locale).and_return('es')
end
it "includes the route" do
......@@ -203,6 +204,10 @@ describe ProjectsHelper do
expect(helper.project_list_cache_key(project)).to include("pipeline-status/#{project.commit.sha}-success")
end
it "includes the user locale" do
expect(helper.project_list_cache_key(project)).to include('es')
end
it "includes the user max member access" do
expect(helper.project_list_cache_key(project)).to include('access:40')
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment