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