From 565c17e5c23c26d813e013884e0582204ff98870 Mon Sep 17 00:00:00 2001 From: Gjero Krsteski Date: Wed, 4 Jan 2017 17:41:09 +0100 Subject: [PATCH] add test for handle the request content type header --- tests/api/Create/ArticleWithUsupportedMediaTypeCept.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/api/Create/ArticleWithUsupportedMediaTypeCept.php b/tests/api/Create/ArticleWithUsupportedMediaTypeCept.php index c16b568..6654ae2 100644 --- a/tests/api/Create/ArticleWithUsupportedMediaTypeCept.php +++ b/tests/api/Create/ArticleWithUsupportedMediaTypeCept.php @@ -1,7 +1,7 @@ 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);