aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Updater/VersionCheckTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Updater/VersionCheckTest.php')
-rw-r--r--tests/lib/Updater/VersionCheckTest.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php
index d6b457da8a2..c85516c320e 100644
--- a/tests/lib/Updater/VersionCheckTest.php
+++ b/tests/lib/Updater/VersionCheckTest.php
@@ -83,6 +83,7 @@ class VersionCheckTest extends \Test\TestCase {
'versionstring' => 'ownCloud 8.0.4',
'url' => 'https://download.owncloud.org/community/owncloud-8.0.4.zip',
'web' => 'http://doc.owncloud.org/server/8.0/admin_manual/maintenance/upgrade.html',
+ 'autoupdater' => '0',
];
$this->config
@@ -93,7 +94,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('getSystemValue')
- ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
+ ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/')
->willReturnArgument(1);
$this->config
->expects($this->at(2))
@@ -120,11 +121,12 @@ class VersionCheckTest extends \Test\TestCase {
<versionstring>ownCloud 8.0.4</versionstring>
<url>https://download.owncloud.org/community/owncloud-8.0.4.zip</url>
<web>http://doc.owncloud.org/server/8.0/admin_manual/maintenance/upgrade.html</web>
+ <autoupdater>0</autoupdater>
</owncloud>';
$this->updater
->expects($this->once())
->method('getUrlContent')
- ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
+ ->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());
@@ -139,7 +141,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('getSystemValue')
- ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
+ ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/')
->willReturnArgument(1);
$this->config
->expects($this->at(2))
@@ -164,7 +166,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->updater
->expects($this->once())
->method('getUrlContent')
- ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
+ ->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/'))
->will($this->returnValue($updateXml));
$this->assertSame([], $this->updater->check());
@@ -176,6 +178,7 @@ class VersionCheckTest extends \Test\TestCase {
'versionstring' => '',
'url' => '',
'web' => '',
+ 'autoupdater' => '',
];
$this->config
@@ -186,7 +189,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('getSystemValue')
- ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
+ ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/')
->willReturnArgument(1);
$this->config
->expects($this->at(2))
@@ -209,11 +212,12 @@ class VersionCheckTest extends \Test\TestCase {
<versionstring></versionstring>
<url></url>
<web></web>
+ <autoupdater></autoupdater>
</owncloud>';
$this->updater
->expects($this->once())
->method('getUrlContent')
- ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
+ ->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());
@@ -230,7 +234,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->config
->expects($this->at(1))
->method('getSystemValue')
- ->with('updater.server.url', 'https://updates.nextcloud.com/update-server/')
+ ->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/')
->willReturnArgument(1);
$this->config
->expects($this->at(2))
@@ -255,7 +259,7 @@ class VersionCheckTest extends \Test\TestCase {
$this->updater
->expects($this->once())
->method('getUrlContent')
- ->with($this->buildUpdateUrl('https://updates.nextcloud.com/update-server/'))
+ ->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/'))
->will($this->returnValue($updateXml));
$this->assertSame($expectedResult, $this->updater->check());