Skip to content

Commit eea50b9

Browse files
committed
add test
1 parent 4bc5861 commit eea50b9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/Unit/Jobs/UpdateSiteTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,29 @@ public function testJobQuitsIfNoUpdateIsAvailable()
5858
$this->assertTrue(true);
5959
}
6060

61+
public function testJobQuitsIfAvailableUpdateWouldBeAMajorUpdate()
62+
{
63+
$site = $this->getSiteMock(
64+
[
65+
'checkHealth' => $this->getHealthCheckMock(),
66+
'getUpdate' => $this->getGetUpdateMock("2.0.0")
67+
]
68+
);
69+
70+
Log::spy();
71+
72+
$object = new UpdateSite($site, "2.0.0");
73+
$object->handle();
74+
75+
Log::shouldHaveReceived('info')
76+
->once()
77+
->withArgs(function ($message) {
78+
return str_contains($message, 'No major update for Site');
79+
});
80+
81+
$this->assertTrue(true);
82+
}
83+
6184
public function testJobQuitsIfAvailableUpdateDoesNotMatchTargetVersion()
6285
{
6386
$site = $this->getSiteMock(

0 commit comments

Comments
 (0)