diff --git a/apps/updatenotification/tests/Notification/BackgroundJobTest.php b/apps/updatenotification/tests/Notification/BackgroundJobTest.php
index 468f4cf9594f094a36e37337eb315ecbdcb31553..92a8a687f5a16b1ff2d2c95a01ac7671e90fc279 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())