mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
20 lines
549 B
PHP
20 lines
549 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 () {
|
|
Queue::fake();
|
|
|
|
$this->artisan('device-models:fetch')
|
|
->expectsOutput('Dispatching FetchDeviceModelsJob...')
|
|
->expectsOutput('FetchDeviceModelsJob has been dispatched successfully.')
|
|
->assertExitCode(0);
|
|
|
|
Queue::assertPushed(FetchDeviceModelsJob::class);
|
|
});
|