Skip to content

Commit

Permalink
add test for handle the request content type header
Browse files Browse the repository at this point in the history
  • Loading branch information
Gjero Krsteski committed Jan 4, 2017
1 parent 59f5005 commit 565c17e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/api/Create/ArticleWithUsupportedMediaTypeCept.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
$I = new ApiTester($scenario);
$I->wantTo('create a article via API using unsupported media type');
$I->haveHttpHeader('Content-Type', 'application/x-www-form-urlencoded');
$I->sendPOST('/articles', ['title' => '', 'content' => ['test'=>'content']]);
$I->seeResponseCodeIs(400);
$I->haveHttpHeader('Content-Type', 'application/NOT-JSON');
$I->sendPOST('/articles', ['title' => 'test', 'content' => ['test'=>'content']]);
$I->seeResponseCodeIs(415);

0 comments on commit 565c17e

Please sign in to comment.