feat: ship creator journey v2 and profile updates
This commit is contained in:
36
tests/Feature/Uploads/UploadContentTypeAssetsTest.php
Normal file
36
tests/Feature/Uploads/UploadContentTypeAssetsTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Inertia\Testing\AssertableInertia;
|
||||
|
||||
uses(RefreshDatabase::class);
|
||||
|
||||
it('exposes mascot and cover art urls for upload content types', function () {
|
||||
$contentTypeId = DB::table('content_types')->insertGetId([
|
||||
'name' => 'Digital Art',
|
||||
'slug' => 'digital-art',
|
||||
'description' => 'Digital art uploads',
|
||||
'order' => 1,
|
||||
'mascot_path' => 'content-types/digital-art/mascot.webp',
|
||||
'cover_art_path' => 'content-types/digital-art/cover.webp',
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
expect($contentTypeId)->toBeInt();
|
||||
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->get('/upload')
|
||||
->assertOk()
|
||||
->assertInertia(fn (AssertableInertia $page) => $page
|
||||
->component('Upload/Index')
|
||||
->has('content_types', 1)
|
||||
->where('content_types.0.slug', 'digital-art')
|
||||
->where('content_types.0.mascot_url', rtrim((string) config('cdn.files_url'), '/') . '/content-types/digital-art/mascot.webp')
|
||||
->where('content_types.0.cover_art_url', rtrim((string) config('cdn.files_url'), '/') . '/content-types/digital-art/cover.webp')
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user