diff --git a/.drone.yml b/.drone.yml index 2362708..1a8beb7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -62,7 +62,10 @@ steps: from_secret: CODECOV_TOKEN settings: token: $CODECOV_TOKEN - files: /usr/local/phyre/web/clover.xml + files: + - /usr/local/phyre/web/clover.xml + flags: + - unit --- kind: pipeline name: Ubuntu 22.04 diff --git a/web/tests/Unit/MicroweberHostingSubscriptionCreateTest.php b/web/tests/Unit/MicroweberHostingSubscriptionCreateTest.php index b6df5b0..d95cf88 100644 --- a/web/tests/Unit/MicroweberHostingSubscriptionCreateTest.php +++ b/web/tests/Unit/MicroweberHostingSubscriptionCreateTest.php @@ -6,6 +6,7 @@ use App\Models\HostingPlan; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Str; use Modules\Microweber\Filament\Clusters\Microweber\Pages\Version; +use Modules\Microweber\Jobs\DownloadMicroweber; use Tests\Feature\Api\ActionTestCase; class MicroweberHostingSubscriptionCreateTest extends ActionTestCase @@ -17,8 +18,8 @@ class MicroweberHostingSubscriptionCreateTest extends ActionTestCase Artisan::call('phyre:install-module Microweber'); - $version = new Version(); - $version->checkForUpdates(); + $downloadMicroweber = new DownloadMicroweber(); + $downloadMicroweber->handle(); $random = rand(1000, 9999); $callHostingPlanStoreResponse = $this->callApiAuthorizedRouteAction('api.hosting-plans.store',[ @@ -73,6 +74,7 @@ class MicroweberHostingSubscriptionCreateTest extends ActionTestCase 'hosting_plan_id' => $hostingPlanId, 'domain' => $hostingSubscriptionDomain, ])->json(); + $this->assertArrayHasKey('status', $callHostingSubscriptionStoreResponse); $this->assertTrue($callHostingSubscriptionStoreResponse['status'] == 'ok'); $this->assertArrayHasKey('data', $callHostingSubscriptionStoreResponse);