summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-02 10:12:55 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-08-02 13:56:36 +0200
commit9391d8fc60e452a53bb8ab0df98fa09f361015ee (patch)
tree72fd166992dc4de3de3ad39811046ef000e4a8e6 /apps/updatenotification/tests
parenta96c6519358a8f6b1d52d0e27bd099b704b22383 (diff)
downloadnextcloud-server-9391d8fc60e452a53bb8ab0df98fa09f361015ee.tar.gz
nextcloud-server-9391d8fc60e452a53bb8ab0df98fa09f361015ee.zip
Improve update notification layout and show non-default update server
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/updatenotification/tests')
-rw-r--r--apps/updatenotification/tests/Controller/AdminControllerTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php
index 21e86b7c02d..ebf044abffd 100644
--- a/apps/updatenotification/tests/Controller/AdminControllerTest.php
+++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php
@@ -103,6 +103,11 @@ class AdminControllerTest extends TestCase {
['core', 'lastupdatedat', '', '12345'],
['updatenotification', 'notify_groups', '["admin"]', '["admin"]'],
]);
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('updater.server.url', 'https://updates.nextcloud.com/server/')
+ ->willReturn('https://updates.nextcloud.com/server/');
$this->dateTimeFormatter
->expects($this->once())
->method('formatDateTime')
@@ -127,6 +132,8 @@ class AdminControllerTest extends TestCase {
'newVersionString' => '8.1.2',
'downloadLink' => 'https://downloads.nextcloud.org/server',
'updaterEnabled' => true,
+ 'isDefaultUpdateServerURL' => true,
+ 'updateServerURL' => 'https://updates.nextcloud.com/server/',
'notify_groups' => 'admin',
];
@@ -155,6 +162,11 @@ class AdminControllerTest extends TestCase {
['core', 'lastupdatedat', '', '12345'],
['updatenotification', 'notify_groups', '["admin"]', '["admin"]'],
]);
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('updater.server.url', 'https://updates.nextcloud.com/server/')
+ ->willReturn('https://updates.nextcloud.com/server/');
$this->dateTimeFormatter
->expects($this->once())
->method('formatDateTime')
@@ -174,6 +186,8 @@ class AdminControllerTest extends TestCase {
'newVersionString' => '',
'downloadLink' => '',
'updaterEnabled' => 0,
+ 'isDefaultUpdateServerURL' => true,
+ 'updateServerURL' => 'https://updates.nextcloud.com/server/',
'notify_groups' => 'admin',
];