summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-06 22:38:44 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-11-06 22:38:44 +0100
commitdf333a9380d3b8836d9278ea4149e82b40ca7bec (patch)
tree024013fd8ea6cb8a561ccd1a612d0e1cd5be6ee7 /spec/features
parent7599009c2726bfdbd73da360961e4d8611641b02 (diff)
parentc71cf908cd4f289248598d9ea1c144c7b65cbb94 (diff)
downloadgitlab-ce-df333a9380d3b8836d9278ea4149e82b40ca7bec.tar.gz
Merge remote-tracking branch 'origin/master' into 35616-move-gke-form-1st-iteration
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/issues/create_branch_merge_request_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/features/issues/create_branch_merge_request_spec.rb b/spec/features/issues/create_branch_merge_request_spec.rb
index 546dc7e8a49..edea95c6699 100644
--- a/spec/features/issues/create_branch_merge_request_spec.rb
+++ b/spec/features/issues/create_branch_merge_request_spec.rb
@@ -64,6 +64,19 @@ feature 'Create Branch/Merge Request Dropdown on issue page', :feature, :js do
end
end
+ context 'when merge requests are disabled' do
+ before do
+ project.project_feature.update(merge_requests_access_level: 0)
+
+ visit project_issue_path(project, issue)
+ end
+
+ it 'shows only create branch button' do
+ expect(page).not_to have_button('Create a merge request')
+ expect(page).to have_button('Create a branch')
+ end
+ end
+
context 'when issue is confidential' do
it 'disables the create branch button' do
issue = create(:issue, :confidential, project: project)