test missing element

This commit is contained in:
Yisroel Baum 2026-05-26 19:47:38 +03:00
parent 90de724f63
commit 1b05d4f1f5
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9

View file

@ -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',
]);
}
}