Files

21 lines
555 B
PHP
Raw Permalink Normal View History

2025-08-16 09:41:00 +02:00
<?php
declare(strict_types=1);
use App\Jobs\FetchDeviceModelsJob;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Queue;
uses(RefreshDatabase::class);
2025-09-24 20:31:32 +02:00
test('command dispatches fetch device models job', function (): void {
2025-08-16 09:41:00 +02:00
Queue::fake();
$this->artisan('device-models:fetch')
->expectsOutput('Dispatching FetchDeviceModelsJob...')
->expectsOutput('FetchDeviceModelsJob has been dispatched successfully.')
->assertExitCode(0);
Queue::assertPushed(FetchDeviceModelsJob::class);
});