Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
Test if request is able to handle rest requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Thibault authored and Thibault committed Sep 27, 2017
1 parent 64b807a commit 22bf439
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/TaigaSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@
return new CurlRequest();
});

it('initializes the request', function () {
$request = new CurlRequest();

expect($request)
->toReceive('enableSSL')
->once();

expect($request)
->toReceive('setUserAgent')
->once();

expect($request)
->toReceive('setHeader')
->with('Content-Type', 'application/json')
->once();

$client = new Taiga($request, $this->url);
});

it('asks the request to pass header', function () {
expect($this->request)->toReceive('setHeader')
->with('Authorization', 'token')
Expand Down

0 comments on commit 22bf439

Please sign in to comment.