Save workspace changes
This commit is contained in:
27
tests/Feature/Worlds/WorldLaunchSeederTest.php
Normal file
27
tests/Feature/Worlds/WorldLaunchSeederTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Models\World;
|
||||
use Database\Seeders\WorldLaunchSeeder;
|
||||
|
||||
it('seeds launch worlds with a featured current world and archived recurrence', function (): void {
|
||||
$this->seed(WorldLaunchSeeder::class);
|
||||
|
||||
$featuredCurrent = World::query()
|
||||
->where('slug', 'like', 'retro-month-%')
|
||||
->where('is_featured', true)
|
||||
->current()
|
||||
->first();
|
||||
|
||||
expect($featuredCurrent)->not->toBeNull();
|
||||
expect($featuredCurrent?->worldRelations()->count())->toBeGreaterThan(0);
|
||||
|
||||
$archivedEdition = World::query()
|
||||
->where('parent_world_id', $featuredCurrent?->id)
|
||||
->where('status', World::STATUS_ARCHIVED)
|
||||
->first();
|
||||
|
||||
expect($archivedEdition)->not->toBeNull();
|
||||
expect(World::query()->count())->toBeGreaterThanOrEqual(6);
|
||||
});
|
||||
Reference in New Issue
Block a user