diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-07-16 00:46:29 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-20 15:38:21 +0300 |
commit | 4d69cb9d9460f9805bfc1f34ca3a600f54804167 (patch) | |
tree | d252ca69044d640cdc4d5253a00552ec5e90d5cc /spec/features/projects/members | |
parent | a920bf3834e870dbc1afabb043c962d26a9c9664 (diff) |
Allow to disable user request access to groups/projects
Diffstat (limited to 'spec/features/projects/members')
-rw-r--r-- | spec/features/projects/members/user_requests_access_spec.rb | 9 |
1 files changed, 9 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 f2fe3ef364d..3190fa21a15 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -8,10 +8,17 @@ feature 'Projects > Members > User requests access', feature: true do background do project.team << [master, :master] login_as(user) + end + + scenario 'request access feature is disabled' do + project.update_attributes(request_access_enabled: false) + visit namespace_project_path(project.namespace, project) + expect(page).not_to have_content 'Request Access' end scenario 'user can request access to a project' do + visit namespace_project_path(project.namespace, project) perform_enqueued_jobs { click_link 'Request Access' } expect(ActionMailer::Base.deliveries.last.to).to eq [master.notification_email] @@ -25,6 +32,7 @@ feature 'Projects > Members > User requests access', feature: true do end scenario 'user is not listed in the project members page' do + visit namespace_project_path(project.namespace, project) click_link 'Request Access' expect(project.requesters.exists?(user_id: user)).to be_truthy @@ -39,6 +47,7 @@ feature 'Projects > Members > User requests access', feature: true do end scenario 'user can withdraw its request for access' do + visit namespace_project_path(project.namespace, project) click_link 'Request Access' expect(project.requesters.exists?(user_id: user)).to be_truthy |