From 648eae2e620ef0703d89a6971d8a5aa6dcf05108 Mon Sep 17 00:00:00 2001 From: ellnix <103502144+ellnix@users.noreply.github.com> Date: Thu, 5 Oct 2023 18:47:12 +0200 Subject: [PATCH] Fix matching_strategy_spec --- spec/meilisearch/index/search/matching_strategy_spec.rb | 4 ++-- spec/support/books_contexts.rb | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/spec/meilisearch/index/search/matching_strategy_spec.rb b/spec/meilisearch/index/search/matching_strategy_spec.rb index 4324e627..1cd08332 100644 --- a/spec/meilisearch/index/search/matching_strategy_spec.rb +++ b/spec/meilisearch/index/search/matching_strategy_spec.rb @@ -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 diff --git a/spec/support/books_contexts.rb b/spec/support/books_contexts.rb index 5af79c28..35b65090 100644 --- a/spec/support/books_contexts.rb +++ b/spec/support/books_contexts.rb @@ -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