<?php

namespace Tests\Feature\Commands;

use App\Console\Commands\SyncVehicles;
use App\Jobs\RunScheduledSyncTask;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Support\Facades\Queue;
use Tests\TestCase;
use Illuminate\Support\Facades\Bus;

class SyncVehiclesCommandTest extends TestCase
{
    use DatabaseMigrations;

    protected $tenancy = true;

    public function testSyncVehicles()
    {
        Bus::fake();
        $this->artisan(SyncVehicles::class)->assertExitCode(0);
        Bus::assertDispatched(RunScheduledSyncTask::class);
    }
}
