|
113 | 113 | expect(index.ranking_rules).to eq(ranking_rules) |
114 | 114 | end |
115 | 115 |
|
| 116 | + it 'updates ranking rules at null' do |
| 117 | + response = index.update_ranking_rules(nil) |
| 118 | + expect(response).to have_key('updateId') |
| 119 | + index.wait_for_pending_update(response['updateId']) |
| 120 | + expect(index.ranking_rules).to eq(default_ranking_rules) |
| 121 | + end |
| 122 | + |
116 | 123 | it 'fails when updating with wrong ranking rules name' do |
117 | 124 | expect do |
118 | 125 | index.update_ranking_rules(wrong_ranking_rules) |
|
150 | 157 | expect(index.distinct_attribute).to eq(distinct_attribute) |
151 | 158 | end |
152 | 159 |
|
| 160 | + it 'updates distinct attribute at null' do |
| 161 | + response = index.update_distinct_attribute(nil) |
| 162 | + expect(response).to have_key('updateId') |
| 163 | + index.wait_for_pending_update(response['updateId']) |
| 164 | + expect(index.distinct_attribute).to be_nil |
| 165 | + end |
| 166 | + |
153 | 167 | it 'resets distinct attribute' do |
154 | 168 | response = index.reset_distinct_attribute |
155 | 169 | expect(response).to have_key('updateId') |
|
181 | 195 | expect(index.searchable_attributes).to eq(searchable_attributes) |
182 | 196 | end |
183 | 197 |
|
| 198 | + it 'updates searchable attributes at null' do |
| 199 | + response = index.update_searchable_attributes(nil) |
| 200 | + expect(response).to have_key('updateId') |
| 201 | + index.wait_for_pending_update(response['updateId']) |
| 202 | + expect(index.searchable_attributes).to eq(default_searchable_attributes) |
| 203 | + end |
| 204 | + |
184 | 205 | it 'resets searchable attributes' do |
185 | 206 | response = index.reset_searchable_attributes |
186 | 207 | expect(response).to have_key('updateId') |
|
213 | 234 | expect(index.displayed_attributes).to contain_exactly(*displayed_attributes) |
214 | 235 | end |
215 | 236 |
|
| 237 | + it 'updates displayed attributes at null' do |
| 238 | + response = index.update_displayed_attributes(nil) |
| 239 | + expect(response).to have_key('updateId') |
| 240 | + index.wait_for_pending_update(response['updateId']) |
| 241 | + expect(index.displayed_attributes).to eq(default_displayed_attributes) |
| 242 | + end |
| 243 | + |
216 | 244 | it 'resets displayed attributes' do |
217 | 245 | response = index.reset_displayed_attributes |
218 | 246 | expect(response).to have_key('updateId') |
|
366 | 394 | expect(index.attributes_for_faceting).to contain_exactly(*attributes_for_faceting) |
367 | 395 | end |
368 | 396 |
|
| 397 | + it 'updates attributes at null' do |
| 398 | + response = index.update_attributes_for_faceting(nil) |
| 399 | + expect(response).to have_key('updateId') |
| 400 | + index.wait_for_pending_update(response['updateId']) |
| 401 | + expect(index.attributes_for_faceting).to be_empty |
| 402 | + end |
| 403 | + |
369 | 404 | it 'resets attributes for faceting' do |
370 | 405 | response = index.reset_attributes_for_faceting |
371 | 406 | expect(response).to have_key('updateId') |
|
0 commit comments