summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-20 12:34:29 +0200
committerRémy Coutable <remy@rymai.me>2016-07-20 14:38:21 +0200
commit5fb436aaa4b9b597a1c9e995ecd13ee2a76aaedf (patch)
tree41c0ad716217ba0ad3939e619ac093adef7db558 /spec/features
parent4d69cb9d9460f9805bfc1f34ca3a600f54804167 (diff)
downloadgitlab-ce-5fb436aaa4b9b597a1c9e995ecd13ee2a76aaedf.tar.gz
Fix a few nitpicks
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/groups/members/user_requests_access_spec.rb11
-rw-r--r--spec/features/projects/members/user_requests_access_spec.rb6
2 files changed, 3 insertions, 14 deletions
diff --git a/spec/features/groups/members/user_requests_access_spec.rb b/spec/features/groups/members/user_requests_access_spec.rb
index 5d3fc23d6f4..b3baa2ab57c 100644
--- a/spec/features/groups/members/user_requests_access_spec.rb
+++ b/spec/features/groups/members/user_requests_access_spec.rb
@@ -9,19 +9,17 @@ feature 'Groups > Members > User requests access', feature: true do
background do
group.add_owner(owner)
login_as(user)
+ visit group_path(group)
end
scenario 'request access feature is disabled' do
group.update_attributes(request_access_enabled: false)
visit group_path(group)
- visit group_path(group)
expect(page).not_to have_content 'Request Access'
end
scenario 'user can request access to a group' do
- visit group_path(group)
-
perform_enqueued_jobs { click_link 'Request Access' }
expect(ActionMailer::Base.deliveries.last.to).to eq [owner.notification_email]
@@ -35,15 +33,12 @@ feature 'Groups > Members > User requests access', feature: true do
end
scenario 'user does not see private projects' do
- visit group_path(group)
-
perform_enqueued_jobs { click_link 'Request Access' }
expect(page).not_to have_content project.name
end
scenario 'user does not see group in the Dashboard > Groups page' do
- visit group_path(group)
perform_enqueued_jobs { click_link 'Request Access' }
visit dashboard_groups_path
@@ -52,8 +47,6 @@ feature 'Groups > Members > User requests access', feature: true do
end
scenario 'user is not listed in the group members page' do
- visit group_path(group)
-
click_link 'Request Access'
expect(group.requesters.exists?(user_id: user)).to be_truthy
@@ -66,8 +59,6 @@ feature 'Groups > Members > User requests access', feature: true do
end
scenario 'user can withdraw its request for access' do
- visit group_path(group)
-
click_link 'Request Access'
expect(group.requesters.exists?(user_id: user)).to be_truthy
diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb
index 3190fa21a15..56ede8eb5be 100644
--- a/spec/features/projects/members/user_requests_access_spec.rb
+++ b/spec/features/projects/members/user_requests_access_spec.rb
@@ -8,17 +8,17 @@ feature 'Projects > Members > User requests access', feature: true do
background do
project.team << [master, :master]
login_as(user)
+ visit namespace_project_path(project.namespace, project)
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]
@@ -32,7 +32,6 @@ 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
@@ -47,7 +46,6 @@ 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