Skip to content

Commit

Permalink
Tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre committed Jan 16, 2024
1 parent 7b34ba7 commit b7b7a61
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spec/meilisearch/index/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -886,5 +886,28 @@ def update_synonyms(index, synonyms)
expect(index.non_separator_tokens).to be_empty
end
end

describe '#proximity_precision' do
it 'has byWord as default value' do
expect(index.proximity_precision).to eq('byWord')
end

it 'updates proximity precision' do
update_task = index.update_proximity_precision('byAttribute')
client.wait_for_task(update_task['taskUid'])

expect(index.proximity_precision).to eq('byAttribute')
end

it 'resets proximity precision' do
update_task = index.update_proximity_precision('byAttribute')
client.wait_for_task(update_task['taskUid'])

reset_task = index.reset_proximity_precision
client.wait_for_task(reset_task['taskUid'])

expect(index.proximity_precision).to eq('byWord')
end
end
end
end

0 comments on commit b7b7a61

Please sign in to comment.