File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 33namespace Tests \Unit \Jobs ;
44
55use App \Exceptions \UpdateException ;
6+ use App \Jobs \CheckSiteHealth ;
67use App \Jobs \UpdateSite ;
78use App \Models \Site ;
89use App \RemoteSite \Connection ;
1415use Illuminate \Database \Eloquent \Relations \HasMany ;
1516use Illuminate \Support \Facades \App ;
1617use Illuminate \Support \Facades \Log ;
18+ use Illuminate \Support \Facades \Queue ;
1719use Tests \TestCase ;
1820
1921class 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 )
You can’t perform that action at this time.
0 commit comments