Fix the unit tests.

This commit is contained in:
James Cole
2017-08-18 15:32:11 +02:00
parent 7d8876f03c
commit 9b17715175
8 changed files with 101 additions and 70 deletions

View File

@@ -143,12 +143,15 @@ class ExportControllerTest extends TestCase
$processor->shouldReceive('collectOldUploads')->once();
$processor->shouldReceive('collectAttachments')->once();
$job = new ExportJob;
$job->user = $this->user();
$repository->shouldReceive('changeStatus')->andReturn(true);
$repository->shouldReceive('findByKey')->andReturn(new ExportJob);
$repository->shouldReceive('findByKey')->andReturn($job);
$this->be($this->user());
$response = $this->post(route('export.export'), $data);
$response = $this->post(route('export.submit'), $data);
$response->assertStatus(200);
$response->assertSee('ok');
}