test missing element
This commit is contained in:
parent
90de724f63
commit
1b05d4f1f5
1 changed files with 10 additions and 0 deletions
|
|
@ -38,4 +38,14 @@ class ElementsEndpointTest extends TestCase
|
|||
],
|
||||
]);
|
||||
}
|
||||
|
||||
public function testReturns404WhenElementDoesNotExist(): void
|
||||
{
|
||||
$response = $this->getJson('/api/elements/999');
|
||||
|
||||
$response->assertNotFound();
|
||||
$response->assertExactJson([
|
||||
'error' => 'Element not found',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue