byos_laravel/tests/Feature/FetchDeviceModelsCommandTest.php
Benjamin Nussbaum b4b6286172
Some checks are pending
tests / ci (push) Waiting to run
refactor: apply rector
2025-09-24 20:35:48 +02:00

20 lines
555 B
PHP

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