mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Add integration test for remaining application api user endpoints
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Traits;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Foundation\Testing\TestResponse;
|
||||
|
||||
trait IntegrationJsonRequestAssertions
|
||||
@@ -13,7 +14,7 @@ trait IntegrationJsonRequestAssertions
|
||||
*/
|
||||
public function assertNotFoundJson(TestResponse $response)
|
||||
{
|
||||
$response->assertStatus(404);
|
||||
$response->assertStatus(Response::HTTP_NOT_FOUND);
|
||||
$response->assertJsonStructure(['errors' => [['code', 'status', 'detail']]]);
|
||||
$response->assertJsonCount(1, 'errors');
|
||||
$response->assertJson([
|
||||
@@ -34,7 +35,7 @@ trait IntegrationJsonRequestAssertions
|
||||
*/
|
||||
public function assertAccessDeniedJson(TestResponse $response)
|
||||
{
|
||||
$response->assertStatus(403);
|
||||
$response->assertStatus(Response::HTTP_FORBIDDEN);
|
||||
$response->assertJsonStructure(['errors' => [['code', 'status', 'detail']]]);
|
||||
$response->assertJsonCount(1, 'errors');
|
||||
$response->assertJson([
|
||||
|
||||
Reference in New Issue
Block a user