Skip to content

Commit

Permalink
Fixup for [#755](#755)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Rabotyaga committed Feb 11, 2021
1 parent e6f2954 commit e595a7c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Bug fixes

* [#755](https://github.com/toptal/chewy/pull/755): attribute_highlights returns an array of highlights ([@musaffa][], [@dalthon][])
* [#695](https://github.com/toptal/chewy/pull/695): Clear the scroll by id after completing scroll_batches ([@socialchorus][])
* [#749](https://github.com/toptal/chewy/pull/749): Avoid importing everything when given an empty relation ([@JF-Lalonde][], [@dalthon][])
* [#736](https://github.com/toptal/chewy/pull/736): Fix nil children when using witchcraft ([@taylor-au][])

## Changes

* [#755](https://github.com/toptal/chewy/pull/755): `attribute_highlights` returns an array of highlights ([@musaffa][], [@dalthon][])
* [#753](https://github.com/toptal/chewy/pull/753): Add support for direct_import parameter to skip objects reloading ([@TikiTDO][], [@dalthon][])
* [#739](https://github.com/toptal/chewy/pull/739): Remove explicit `main` branch dependencies on rspec* gems after `rspec-mocks` 3.10.2 is released ([@rabotyaga][])

Expand Down
1 change: 1 addition & 0 deletions spec/chewy/search/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@
describe '#highlight' do
specify { expect(subject.query(match: {name: 'name3'}).highlight(fields: {name: {}}).first.name).to eq('Name3') }
specify { expect(subject.query(match: {name: 'name3'}).highlight(fields: {name: {}}).first.name_highlight).to eq('<em>Name3</em>') }
specify { expect(subject.query(match: {name: 'name3'}).highlight(fields: {name: {}}).first.name_highlights).to eq(['<em>Name3</em>']) }
specify { expect(subject.query(match: {name: 'name3'}).highlight(fields: {name: {}}).first._data['_source']['name']).to eq('Name3') }
end

Expand Down
3 changes: 2 additions & 1 deletion spec/chewy/type/wrapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
.and respond_to(:name_highlights)
.and have_attributes(
name: 'Martin',
name_highlight: '<b>Mar</b>tin'
name_highlight: '<b>Mar</b>tin',
name_highlights: ['<b>Mar</b>tin']
)
end
end
Expand Down

0 comments on commit e595a7c

Please sign in to comment.