diff --git a/apps/updatenotification/tests/Notification/BackgroundJobTest.php b/apps/updatenotification/tests/Notification/BackgroundJobTest.php index 468f4cf959..92a8a687f5 100644 --- a/apps/updatenotification/tests/Notification/BackgroundJobTest.php +++ b/apps/updatenotification/tests/Notification/BackgroundJobTest.php @@ -166,7 +166,7 @@ class BackgroundJobTest extends TestCase { if ($version === null) { $job->expects($this->never()) ->method('createNotifications'); - $job->expects($this->never()) + $job->expects($versionCheck === null ? $this->never() : $this->once()) ->method('clearErrorNotifications'); } else if ($version === false) { $job->expects($this->never())