Tenant::class]); }); test('job deletes domains successfully', function () { $tenant = Tenant::create(); $tenant->domains()->create([ 'domain' => 'foo.localhost', ]); $tenant->domains()->create([ 'domain' => 'bar.localhost', ]); expect($tenant->domains()->count())->toBe(2); (new DeleteDomains($tenant->refresh()))->handle(); expect($tenant->refresh()->domains()->count())->toBe(0); });