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
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-04-06 19:27:12 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-11 11:51:16 +0300
commit083b0a9b034a0e4004c012444f1a8811bd96ed29 (patch)
tree942fcb5b65d17323130f6e8b5a6a499b2235c07d /spec/features
parent1747a573dff40ab51ba892bf9f5293e3c9b794d6 (diff)
Hide file/directory creation buttons
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/projects/branches_spec.rb22
1 files changed, 21 insertions, 1 deletions
diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb
index 2a9d9e6416c..acf478cd117 100644
--- a/spec/features/projects/branches_spec.rb
+++ b/spec/features/projects/branches_spec.rb
@@ -195,6 +195,26 @@ describe 'Branches' do
expect(page).to have_content("Protected branches can be managed in project settings")
end
end
+
+ it 'shows the merge request button' do
+ visit project_branches_path(project)
+
+ page.within first('.all-branches li') do
+ expect(page).to have_content 'Merge request'
+ end
+ end
+
+ context 'when the project is archived' do
+ let(:project) { create(:project, :public, :repository, archived: true) }
+
+ it 'does not show the merge request button when the project is archived' do
+ visit project_branches_path(project)
+
+ page.within first('.all-branches li') do
+ expect(page).not_to have_content 'Merge request'
+ end
+ end
+ end
end
context 'logged out' do
@@ -204,7 +224,7 @@ describe 'Branches' do
it 'does not show merge request button' do
page.within first('.all-branches li') do
- expect(page).not_to have_content 'Merge Request'
+ expect(page).not_to have_content 'Merge request'
end
end
end