Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGeorge Andrinopoulos <geoandri@gmail.com>2017-11-06 17:33:37 +0300
committerRémy Coutable <remy@rymai.me>2017-11-06 17:33:37 +0300
commit4c31455a6b6e027edb3b7dbb80235c2dc7ce491d (patch)
tree2424608e9c739a92f1a3ada0fb832c7c321d31ec /spec
parent1e94172e38aebae8804fda9831261da1081a6422 (diff)
Remove create MR button from issues when MRs are disabled
Diffstat (limited to 'spec')
-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)