update() public method

Update the given model in the index.
public update ( Illuminate\Database\Eloquent\Collection $models ) : void
$models Illuminate\Database\Eloquent\Collection
return void
 public function test_update_adds_objects_to_index()
 {
     $client = Mockery::mock('Elasticsearch\\Client');
     $client->shouldReceive('bulk')->with(['body' => [['update' => ['_id' => 1, '_index' => 'scout', '_type' => 'table']], ['doc' => ['id' => 1], 'doc_as_upsert' => true]]]);
     $engine = new ElasticsearchEngine($client, 'scout');
     $engine->update(Collection::make([new ElasticsearchEngineTestModel()]));
 }