Commit b851bc8a authored by Mario de la Ossa's avatar Mario de la Ossa

resolve conflicts in spec/requests/api/search_spec.rb

parent 0035375a
......@@ -3,13 +3,8 @@ require 'spec_helper'
describe API::Search do
set(:user) { create(:user) }
set(:group) { create(:group) }
<<<<<<< HEAD
let(:project) { create(:project, :public, name: 'awesome project', group: group) }
let(:repo_project) { create(:project, :public, :repository, group: group) }
=======
set(:project) { create(:project, :public, name: 'awesome project', group: group) }
set(:repo_project) { create(:project, :public, :repository, group: group) }
>>>>>>> upstream/master
shared_examples 'response is correct' do |schema:, size: 1|
it { expect(response).to have_gitlab_http_status(200) }
......@@ -18,7 +13,6 @@ describe API::Search do
it { expect(json_response.size).to eq(size) }
end
<<<<<<< HEAD
shared_examples 'elasticsearch disabled' do
it 'returns 400 error for wiki_blobs scope' do
get api(endpoint, user), scope: 'wiki_blobs', search: 'awesome'
......@@ -87,8 +81,6 @@ describe API::Search do
end
end
=======
>>>>>>> upstream/master
describe 'GET /search' do
context 'when user is not authenticated' do
it 'returns 401 error' do
......@@ -117,11 +109,8 @@ describe API::Search do
context 'with correct params' do
context 'for projects scope' do
before do
<<<<<<< HEAD
project
=======
>>>>>>> upstream/master
get api('/search', user), scope: 'projects', search: 'awesome'
end
......@@ -177,7 +166,6 @@ describe API::Search do
it_behaves_like 'response is correct', schema: 'public_api/v4/snippets'
end
<<<<<<< HEAD
context 'when elasticsearch is enabled' do
it_behaves_like 'elasticsearch disabled' do
......@@ -190,8 +178,6 @@ describe API::Search do
let(:endpoint) { '/search' }
end
end
=======
>>>>>>> upstream/master
end
end
......@@ -241,11 +227,8 @@ describe API::Search do
context 'with correct params' do
context 'for projects scope' do
before do
<<<<<<< HEAD
project
=======
>>>>>>> upstream/master
get api("/groups/#{group.id}/-/search", user), scope: 'projects', search: 'awesome'
end
......@@ -281,7 +264,6 @@ describe API::Search do
it_behaves_like 'response is correct', schema: 'public_api/v4/milestones'
end
<<<<<<< HEAD
context 'when elasticsearch is enabled' do
it_behaves_like 'elasticsearch disabled' do
......@@ -294,8 +276,6 @@ describe API::Search do
let(:endpoint) { "/groups/#{group.id}/-/search" }
end
end
=======
>>>>>>> upstream/master
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment