summaryrefslogtreecommitdiff
path: root/spec/helpers/projects_helper_spec.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-07-06 07:51:31 +0000
committerDouwe Maan <douwe@gitlab.com>2018-07-06 07:51:31 +0000
commit837c3b3d7322c56aa7baeec9b8fb617afe5b5e5c (patch)
treeb6da7ba13c76c13e3afee03c11b7524f896f207f /spec/helpers/projects_helper_spec.rb
parent83f79ced3fd98031194e5667c4d80f66d7987c67 (diff)
downloadgitlab-ce-837c3b3d7322c56aa7baeec9b8fb617afe5b5e5c.tar.gz
Fix User role displayed on projects dashboard
Diffstat (limited to 'spec/helpers/projects_helper_spec.rb')
-rw-r--r--spec/helpers/projects_helper_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index 80147b13739..beb6e8ea273 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -80,6 +80,7 @@ describe ProjectsHelper do
before 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)
end
it "includes the route" do
@@ -125,6 +126,10 @@ describe ProjectsHelper do
expect(helper.project_list_cache_key(project)).to include("pipeline-status/#{project.commit.sha}-success")
end
+
+ it "includes the user max member access" do
+ expect(helper.project_list_cache_key(project)).to include('access:40')
+ end
end
describe '#load_pipeline_status' do