fix(node): Do not push the node to the index
This commit is contained in:
parent
40f326aa68
commit
7a52a36aee
@ -152,6 +152,7 @@ class AlgoliaSearchRecordExtractor
|
||||
items = []
|
||||
raw_items.each do |raw_item|
|
||||
nokogiri_node = raw_item[:node]
|
||||
raw_item.delete(:node)
|
||||
item = shared_attributes.merge(raw_item)
|
||||
|
||||
item = custom_hook_each(item, nokogiri_node)
|
||||
|
||||
@ -350,6 +350,17 @@ describe(AlgoliaSearchRecordExtractor) do
|
||||
expect(actual[0][:name]).to eq 'foo'
|
||||
end
|
||||
|
||||
it 'should not expose the HTML node' do
|
||||
# Given
|
||||
input = fixture_only_paragraphs
|
||||
|
||||
# When
|
||||
actual = input.extract
|
||||
|
||||
# Then
|
||||
expect(actual[0][:node]).to eq nil
|
||||
end
|
||||
|
||||
it 'should get a complete record' do
|
||||
# Given
|
||||
input = fixture_page
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user