summaryrefslogtreecommitdiff
path: root/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb')
-rw-r--r--spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb b/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb
index 0f10b0a4010..afa9de5ce86 100644
--- a/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb
+++ b/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb
@@ -63,6 +63,23 @@ RSpec.describe 'Projects > Show > User sees setup shortcut buttons' do
expect(page).to have_link('Add LICENSE', href: presenter.add_license_path)
end
end
+
+ context 'Gitlab::CurrentSettings.default_branch_name is available' do
+ before do
+ expect(Gitlab::CurrentSettings)
+ .to receive(:default_branch_name)
+ .at_least(:once)
+ .and_return('example_branch')
+
+ visit project_path(project)
+ end
+
+ it '"New file" button linked to new file page' do
+ page.within('.project-buttons') do
+ expect(page).to have_link('New file', href: project_new_blob_path(project, 'example_branch'))
+ end
+ end
+ end
end
end