Skip to content

Commit

Permalink
Merge pull request #495 from ellnix/fix-matching-strategy-spec
Browse files Browse the repository at this point in the history
Fix matching_strategy_spec
  • Loading branch information
brunoocasali authored Oct 16, 2023
2 parents 1532c27 + 0b52793 commit 2dc9b88
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/meilisearch/index/search/matching_strategy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
include_context 'search books with nested fields'

it 'does a custom search with a matching strategy ALL' do
response = index.search('another french book', matching_strategy: 'all')
response = index.search('best book again', matching_strategy: 'all')

expect(response['hits'].count).to eq(1)
end

it 'does a custom search with a matching strategy LAST' do
response = index.search('french book', matching_strategy: 'last')
response = index.search('best book again', matching_strategy: 'last')

expect(response['hits'].count).to eq(2)
end
Expand Down
8 changes: 8 additions & 0 deletions spec/support/books_contexts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@
{
id: 7,
title: 'The Hitchhiker\'s Guide to the Galaxy'
},
{
id: 8,
title: 'Harry Potter and the Deathly Hallows',
info: {
comment: 'The best book again',
reviewNb: 1000
}
}
]
end
Expand Down

0 comments on commit 2dc9b88

Please sign in to comment.