summaryrefslogtreecommitdiff
path: root/spec/features/projects/branches_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/branches_spec.rb')
-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..b7ce1b9993a 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) }
+
+ 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