Improve test coverage.

This commit is contained in:
James Cole
2018-12-10 21:45:44 +01:00
parent 5313652d7a
commit 159fffef2e
26 changed files with 2335 additions and 347 deletions

View File

@@ -119,7 +119,7 @@ class ConfigurationControllerTest extends TestCase
{
$userRepos = $this->mock(UserRepositoryInterface::class);
$userRepos->shouldReceive('hasRole')->withArgs([Mockery::any(), 'owner'])->atLeast()->once()->andReturn(true);
$data = [
$data = [
'value' => 1,
];
@@ -221,10 +221,10 @@ class ConfigurationControllerTest extends TestCase
public function testUpdateInvalid(): void
{
$userRepos = $this->mock(UserRepositoryInterface::class);
$data = [
$data = [
'value' => 'true',
];
$response = $this->post('/api/v1/configuration/last_update_check', $data);
$response = $this->post('/api/v1/configuration/last_update_check', $data);
$response->assertStatus(404);
}