Limit-Status im Upload-Flow anzeigen (Warnbanner + Sperrzustände).
Upload-Fehlercodes auswerten und freundliche Dialoge zeigen.
This commit is contained in:
31
tests/Feature/Api/Event/PublicEventErrorResponseTest.php
Normal file
31
tests/Feature/Api/Event/PublicEventErrorResponseTest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Api\Event;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class PublicEventErrorResponseTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_invalid_join_token_returns_structured_error(): void
|
||||
{
|
||||
$response = $this->getJson('/api/v1/events/not-a-token/stats');
|
||||
|
||||
$response->assertStatus(404);
|
||||
$response->assertJsonStructure([
|
||||
'error' => ['code', 'title', 'message', 'meta'],
|
||||
]);
|
||||
|
||||
$response->assertJson([
|
||||
'error' => [
|
||||
'code' => 'invalid_token',
|
||||
'title' => 'Invalid Join Token',
|
||||
'message' => 'The provided join token is invalid.',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->assertSame('not-a-token', $response->json('error.meta.token'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user