Skip to content

Commit 5d840cb

Browse files
committed
fix test
1 parent 473ccde commit 5d840cb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Unit/Jobs/UpdateSiteTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Tests\Unit\Jobs;
44

55
use App\Exceptions\UpdateException;
6+
use App\Jobs\CheckSiteHealth;
67
use App\Jobs\UpdateSite;
78
use App\Models\Site;
89
use App\RemoteSite\Connection;
@@ -14,6 +15,7 @@
1415
use Illuminate\Database\Eloquent\Relations\HasMany;
1516
use Illuminate\Support\Facades\App;
1617
use Illuminate\Support\Facades\Log;
18+
use Illuminate\Support\Facades\Queue;
1719
use Tests\TestCase;
1820

1921
class UpdateSiteTest extends TestCase
@@ -182,6 +184,8 @@ public function testJobWritesFailLogOnFailing()
182184

183185
public function testJobWritesSuccessLogForSuccessfulJobs()
184186
{
187+
Queue::fake();
188+
185189
$site = $this->getSiteMock(
186190
[
187191
'checkHealth' => $this->getHealthCheckMock(),
@@ -201,6 +205,8 @@ public function testJobWritesSuccessLogForSuccessfulJobs()
201205

202206
$object = new UpdateSite($site, "1.0.1");
203207
$object->handle();
208+
209+
Queue::assertPushed(CheckSiteHealth::class);
204210
}
205211

206212
protected function getSiteMock(array $responses, array $expectedLogRow = null, int $updateCount = 0)

0 commit comments

Comments
 (0)