From af4fa4ba25655bcb3941d20f16b87fc4861d0bb5 Mon Sep 17 00:00:00 2001 From: meili-bot <74670311+meili-bot@users.noreply.github.com> Date: Wed, 5 Jul 2023 15:06:14 -0300 Subject: [PATCH 1/2] Update README.md From e60141c47896b4d9137f8ed7883b5fb11146d970 Mon Sep 17 00:00:00 2001 From: Bruno Casali Date: Wed, 2 Aug 2023 00:58:51 -0300 Subject: [PATCH 2/2] Fix tests after v1.3 --- spec/meilisearch/index/settings_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/meilisearch/index/settings_spec.rb b/spec/meilisearch/index/settings_spec.rb index 818e5309..0a97608b 100644 --- a/spec/meilisearch/index/settings_spec.rb +++ b/spec/meilisearch/index/settings_spec.rb @@ -776,15 +776,15 @@ def update_synonyms(index, synonyms) context 'On faceting' do let(:index) { client.index(uid) } - let(:faceting) { { maxValuesPerFacet: 333 } } - let(:default_faceting) { { maxValuesPerFacet: 100 } } + let(:faceting) { { maxValuesPerFacet: 333, sortFacetValuesBy: { '*' => 'alpha' } } } + let(:default_faceting) { { maxValuesPerFacet: 100, sortFacetValuesBy: { '*' => 'alpha' } } } before { client.create_index!(uid) } it 'gets default values of faceting' do settings = index.faceting.transform_keys(&:to_sym) - expect(settings).to eq(default_faceting) + expect(settings.keys).to include(*default_faceting.keys) end it 'updates faceting' do @@ -801,7 +801,7 @@ def update_synonyms(index, synonyms) update_task = index.update_faceting(nil) client.wait_for_task(update_task['taskUid']) - expect(index.faceting.transform_keys(&:to_sym)).to eq(default_faceting) + expect(index.faceting.transform_keys(&:to_sym).keys).to include(*default_faceting.keys) end it 'resets faceting' do @@ -811,7 +811,7 @@ def update_synonyms(index, synonyms) reset_task = index.reset_faceting client.wait_for_task(reset_task['taskUid']) - expect(index.faceting.transform_keys(&:to_sym)).to eq(default_faceting) + expect(index.faceting.transform_keys(&:to_sym).keys).to include(*default_faceting.keys) end end end