summaryrefslogtreecommitdiff
path: root/spec/features/search/user_searches_for_commits_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/search/user_searches_for_commits_spec.rb')
-rw-r--r--spec/features/search/user_searches_for_commits_spec.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/features/search/user_searches_for_commits_spec.rb b/spec/features/search/user_searches_for_commits_spec.rb
index 2dceda09d7c..4ec2a9e6cff 100644
--- a/spec/features/search/user_searches_for_commits_spec.rb
+++ b/spec/features/search/user_searches_for_commits_spec.rb
@@ -3,13 +3,12 @@
require 'spec_helper'
RSpec.describe 'User searches for commits', :js do
- include CycleAnalyticsHelpers
-
let(:project) { create(:project, :repository) }
let(:sha) { '6d394385cf567f80a8fd85055db1ab4c5295806f' }
let(:user) { create(:user) }
before do
+ stub_feature_flags(search_page_vertical_nav: false)
project.add_reporter(user)
sign_in(user)
@@ -34,7 +33,12 @@ RSpec.describe 'User searches for commits', :js do
context 'when searching by message' do
it 'finds a commit and holds on /search page' do
- create_commit('Message referencing another sha: "deadbeef"', project, user, 'master')
+ project.repository.commit_files(
+ user,
+ message: 'Message referencing another sha: "deadbeef"',
+ branch_name: 'master',
+ actions: [{ action: :create, file_path: 'a/new.file', contents: 'new file' }]
+ )
submit_search('deadbeef')