diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-04-22 00:18:09 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-04-22 00:18:09 +0100 |
commit | 2fe0d9f25a46699e7b7d03382c2aa4b4646b5f4c (patch) | |
tree | c59d2c0ff6a5478a86ea80cefd2f1d3a0eab19c0 /spec | |
parent | 8e156d662b7895ce8777f34882422c3714cc65c7 (diff) | |
download | gitlab-ce-2fe0d9f25a46699e7b7d03382c2aa4b4646b5f4c.tar.gz |
Added test to prevent ‘Request access’ regression29335-fix-request-access-button-visibility
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/projects/members/user_requests_access_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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' |