Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
thijskok committed Dec 20, 2019
1 parent 9ea9388 commit 0979bbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/Actions/ManagesProjects.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ public function projects(int $accountId): array
{
$result = $this->get("{$accountId}/internal-projects");

if ($result === '[]') {
return [];
}

return array_map(function ($project) {
return $this->fromDoneDoneProject($project);
}, $result);
}, is_array($result) ? $result : []);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/TasksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function it_should_create_a_task()

$donedone->setClient($service = Mockery::mock('\GuzzleHttp\Client'));

$service->shouldReceive('request')->once()->andReturn($response = Mockery::mock('Psr\Http\Message\ResponseInterface'));
$service->shouldReceive('request')->twice()->andReturn($response = Mockery::mock('Psr\Http\Message\ResponseInterface'));
$response->shouldReceive('getStatusCode')->andReturn(200);
$response->shouldReceive('getBody')->andReturn(json_encode($this->task));

Expand Down

0 comments on commit 0979bbf

Please sign in to comment.