Commit 12ee65ae authored by Arun Kumar Mohan's avatar Arun Kumar Mohan

Fix projects list to show info in user's locale

parent 9faa870e
......@@ -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