Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix matching_strategy_spec #495

Merged
merged 3 commits into from Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/meilisearch/index/search/matching_strategy_spec.rb
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
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