spec/account_client_spec.rb in algoliasearch-1.27.3 vs spec/account_client_spec.rb in algoliasearch-1.27.4
- old
+ new
@@ -45,13 +45,11 @@
)
end
it 'should perform a cross app copy index and assert that destination must not exist' do
- @index_1.save_objects! ([
- {:objectID => 'one'},
- ])
+ @index_1.save_objects!(1.upto(1500).map { |i| { :objectID => i, :i => i } })
@index_1.batch_rules! ([
{
:objectID => 'one',
:condition => {:pattern => 'test', :anchoring => 'contains'},
@@ -65,12 +63,11 @@
@index_1.set_settings! ({:searchableAttributes => ['objectID']})
Algolia::AccountClient.copy_index!(@index_1, @index_3)
- res = @index_3.search('');
- res['nbHits'].should eq(1)
- res['hits'][0]['objectID'].should eq('one')
+ res = @index_3.search('')
+ res['nbHits'].should eq(1500)
res = @index_3.search_rules('')['hits']
res.size.should eq(1)
res[0]['objectID'].should eq('one')