Skip to content

Commit

Permalink
Test fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
IsraelOrtuno committed Dec 15, 2015
1 parent cbce618 commit b5acfe4
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions spec/RequestSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function it_is_initializable()
{
$this->shouldHaveType('Devio\Pipedrive\Request');
}

public function let(Client $client)
{
$this->beConstructedWith($client);
Expand All @@ -23,18 +23,21 @@ public function let(Client $client)
public function it_makes_a_request(Client $client, Response $response)
{
$content = ['success' => true, 'data' => []];
$response->isSuccess()
->shouldBeCalled()
->willReturn(true);
$response->getContent()
->shouldBeCalled()
->willReturn((object) $content);
->shouldBeCalled()
->willReturn((object)$content);
$client->get('foo/1', [])
->shouldBeCalled()
->willReturn($response);
->shouldBeCalled()
->willReturn($response);
$client->put('foo/1', ['name' => 'bar'])
->shouldBeCalled()
->willReturn($response);
->shouldBeCalled()
->willReturn($response);
$client->post('foo', [])
->shouldBeCalled()
->willReturn($response);
->shouldBeCalled()
->willReturn($response);

$this->get('foo/:id', ['id' => 1]);
$this->put('foo/:id', ['id' => 1, 'name' => 'bar']);
Expand Down

0 comments on commit b5acfe4

Please sign in to comment.