Add new public status index (#26344)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com> Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
96bcee66fb
commit
30c191aaa0
28 changed files with 584 additions and 87 deletions
31
spec/chewy/public_statuses_index_spec.rb
Normal file
31
spec/chewy/public_statuses_index_spec.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe PublicStatusesIndex do
|
||||
describe 'Searching the index' do
|
||||
before do
|
||||
mock_elasticsearch_response(described_class, raw_response)
|
||||
end
|
||||
|
||||
it 'returns results from a query' do
|
||||
results = described_class.query(match: { name: 'status' })
|
||||
|
||||
expect(results).to eq []
|
||||
end
|
||||
end
|
||||
|
||||
def raw_response
|
||||
{
|
||||
took: 3,
|
||||
hits: {
|
||||
hits: [
|
||||
{
|
||||
_id: '0',
|
||||
_score: 1.6375021,
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue