Removed Laravel Jetstream

This commit is contained in:
Constantin Graf
2026-06-08 16:37:02 +02:00
parent 42f9efd570
commit cb42daecbf
57 changed files with 964 additions and 1357 deletions

View File

@@ -193,7 +193,7 @@ class InvitationEndpointTest extends ApiEndpointTestAbstract
Passport::actingAs($data->user);
// Act
$response = $this->postJson(route('api.v1.invitations.store', $data->organization->getKey()), [
$response = $this->withoutExceptionHandling()->postJson(route('api.v1.invitations.store', $data->organization->getKey()), [
'email' => $user->email,
'role' => Role::Employee->value,
]);

View File

@@ -0,0 +1,44 @@
<?php
declare(strict_types=1);
namespace Tests\Unit\Endpoint\Api\V1;
use App\Http\Controllers\Api\V1\TimeZoneController;
use App\Service\TimezoneService;
use PHPUnit\Framework\Attributes\CoversClass;
use Tests\TestCase;
#[CoversClass(TimeZoneController::class)]
#[CoversClass(TimezoneService::class)]
class TimeZoneEndpointTest extends TestCase
{
public function test_index_returns_list_of_available_timezones(): void
{
// Arrange
$timezones = app(TimezoneService::class)->getTimezones();
// Act
$response = $this->getJson(route('api.v1.time-zones.index'));
// Assert
$response->assertOk();
$response->assertJsonCount(count($timezones));
$response->assertJsonStructure([
[
'key',
],
]);
$responseObj = collect($response->json());
$this->assertSame([
'key' => $timezones[0],
], $responseObj->first());
$this->assertSame([
'key' => 'Europe/Vienna',
], $responseObj->firstWhere('key', '=', 'Europe/Vienna'));
$this->assertSame([
'key' => 'America/New_York',
], $responseObj->firstWhere('key', '=', 'America/New_York'));
}
}

View File

@@ -310,7 +310,7 @@ class UserEndpointTest extends ApiEndpointTestAbstract
{
// Arrange
$data = $this->createUserWithPermission();
$photoDisk = (string) config('jetstream.profile_photo_disk', 'public');
$photoDisk = (string) config('filesystems.public', 'public');
$previousPhotoPath = 'profile-photos/previous.png';
$photo = file_get_contents(resource_path('testfiles/test.png'));
$this->assertIsString($photo);
@@ -491,7 +491,7 @@ class UserEndpointTest extends ApiEndpointTestAbstract
{
// Arrange
$data = $this->createUserWithPermission();
$photoDisk = (string) config('jetstream.profile_photo_disk', 'public');
$photoDisk = (string) config('filesystems.public', 'public');
$photoPath = 'profile-photos/existing.png';
Storage::fake($photoDisk);
Storage::disk($photoDisk)->put($photoPath, 'photo contents');
@@ -515,7 +515,7 @@ class UserEndpointTest extends ApiEndpointTestAbstract
{
// Arrange
$data = $this->createUserWithPermission();
$photoDisk = (string) config('jetstream.profile_photo_disk', 'public');
$photoDisk = (string) config('filesystems.public', 'public');
Storage::fake($photoDisk);
$data->user->profile_photo_path = null;
$data->user->save();
@@ -536,7 +536,7 @@ class UserEndpointTest extends ApiEndpointTestAbstract
{
// Arrange
$data = $this->createUserWithPermission();
$photoDisk = (string) config('jetstream.profile_photo_disk', 'public');
$photoDisk = (string) config('filesystems.public', 'public');
$photoPath = 'profile-photos/existing.png';
Storage::fake($photoDisk);
Storage::disk($photoDisk)->put($photoPath, 'photo contents');