8000 [Tests] Update content negotiation test · isabella232/laravel-json-api@f31554e · GitHub
[go: up one dir, main page]

Skip to content

Commit f31554e

Browse files
committed
[Tests] Update content negotiation test
1 parent 4fb9633 commit f31554e
8000

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/lib/Integration/ContentNegotiation/DefaultTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,17 @@ public function testNotOkWithoutBody()
4242
$data = $this->willPatch();
4343

4444
$headers = $this->transformHeadersToServerVars(['Accept' => 'application/vnd.api+json']);
45-
$this->call('PATCH', "/api/v1/posts/{$data['id']}", [], [], [], $headers)->assertStatus(400);
45+
$response = $this->call('PATCH', "/api/v1/posts/{$data['id']}", [], [], [], $headers);
46+
47+
$response->assertStatus(400)->assertExactJson([
48+
'errors' => [
49+
[
50+
"status" => "400",
51+
"title" => "Document Required",
52+
"detail" => "Expecting request to contain a JSON API document.",
53+
],
54+
],
55+
]);
4656
}
4757

4858
/**

0 commit comments

Comments
 (0)
0