From 2fe0d9f25a46699e7b7d03382c2aa4b4646b5f4c Mon Sep 17 00:00:00 2001 From: James Edwards-Jones <jedwardsjones@gitlab.com> Date: Sat, 22 Apr 2017 00:18:09 +0100 Subject: [PATCH] =?UTF-8?q?Added=20test=20to=20prevent=20=E2=80=98Request?= =?UTF-8?q?=20access=E2=80=99=20regression?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projects/members/user_requests_access_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb index de25d45f447..1bf8f710b9f 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -31,6 +31,17 @@ feature 'Projects > Members > User requests access', feature: true do expect(page).not_to have_content 'Leave Project' end + context 'code access is restricted' do + scenario 'user can request access' do + project.project_feature.update!(repository_access_level: ProjectFeature::PRIVATE, + builds_access_level: ProjectFeature::PRIVATE, + merge_requests_access_level: ProjectFeature::PRIVATE) + visit namespace_project_path(project.namespace, project) + + expect(page).to have_content 'Request Access' + end + end + scenario 'user is not listed in the project members page' do click_link 'Request Access' -- GitLab