diff options
author | Joas Schilling <coding@schilljs.com> | 2016-09-27 14:47:59 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-09-27 14:47:59 +0200 |
commit | 3e00554d35be995f52fba4ab49fc6ef1b01fc37b (patch) | |
tree | ce7942f14193e9f6c85401cbdfd4045e2fa9a07c /apps/updatenotification/tests/Controller/AdminControllerTest.php | |
parent | 6f955defe46b498f014d4e0f105d26324bb7ecd6 (diff) | |
download | nextcloud-server-3e00554d35be995f52fba4ab49fc6ef1b01fc37b.tar.gz nextcloud-server-3e00554d35be995f52fba4ab49fc6ef1b01fc37b.zip |
Respect updater kill switch and fall back to download button
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/updatenotification/tests/Controller/AdminControllerTest.php')
-rw-r--r-- | apps/updatenotification/tests/Controller/AdminControllerTest.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index 336edffc957..2360663e1c5 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -111,7 +111,12 @@ class AdminControllerTest extends TestCase { $this->updateChecker ->expects($this->once()) ->method('getUpdateState') - ->willReturn(['updateVersion' => '8.1.2']); + ->willReturn([ + 'updateAvailable' => true, + 'updateVersion' => '8.1.2', + 'downloadLink' => 'https://downloads.nextcloud.org/server', + 'updaterEnabled' => true, + ]); $params = [ 'isNewVersionAvailable' => true, @@ -119,6 +124,8 @@ class AdminControllerTest extends TestCase { 'currentChannel' => \OCP\Util::getChannel(), 'channels' => $channels, 'newVersionString' => '8.1.2', + 'downloadLink' => 'https://downloads.nextcloud.org/server', + 'updaterEnabled' => true, 'notify_groups' => 'admin', ]; @@ -155,7 +162,7 @@ class AdminControllerTest extends TestCase { $this->updateChecker ->expects($this->once()) ->method('getUpdateState') - ->willReturn([]); + ->willReturn(['updaterEnabled' => false]); $params = [ 'isNewVersionAvailable' => false, @@ -163,6 +170,8 @@ class AdminControllerTest extends TestCase { 'currentChannel' => \OCP\Util::getChannel(), 'channels' => $channels, 'newVersionString' => '', + 'downloadLink' => '', + 'updaterEnabled' => 0, 'notify_groups' => 'admin', ]; |