diff options
author | Joas Schilling <coding@schilljs.com> | 2018-11-09 10:22:19 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-11-09 10:24:34 +0100 |
commit | eff7a9c904e59ce112d70e159e85731751d01b34 (patch) | |
tree | e73bcc39c29344efe091df4539fc2f8e3e0209d6 /apps/updatenotification/tests | |
parent | 03b140c0081c5edc09eff96c493f1338eb2cd5a6 (diff) | |
download | nextcloud-server-eff7a9c904e59ce112d70e159e85731751d01b34.tar.gz nextcloud-server-eff7a9c904e59ce112d70e159e85731751d01b34.zip |
Adjust unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/updatenotification/tests')
-rw-r--r-- | apps/updatenotification/tests/Settings/AdminTest.php | 4 | ||||
-rw-r--r-- | apps/updatenotification/tests/UpdateCheckerTest.php | 14 |
2 files changed, 11 insertions, 7 deletions
diff --git a/apps/updatenotification/tests/Settings/AdminTest.php b/apps/updatenotification/tests/Settings/AdminTest.php index d1f44367a1c..3eaeb592224 100644 --- a/apps/updatenotification/tests/Settings/AdminTest.php +++ b/apps/updatenotification/tests/Settings/AdminTest.php @@ -104,6 +104,7 @@ class AdminTest extends TestCase { ->willReturn([ 'updateAvailable' => true, 'updateVersion' => '8.1.2', + 'updateVersionString' => 'Nextcloud 8.1.2', 'downloadLink' => 'https://downloads.nextcloud.org/server', 'changes' => [], 'updaterEnabled' => true, @@ -129,7 +130,8 @@ class AdminTest extends TestCase { 'lastChecked' => 'LastCheckedReturnValue', 'currentChannel' => Util::getChannel(), 'channels' => $channels, - 'newVersionString' => '8.1.2', + 'newVersion' => '8.1.2', + 'newVersionString' => 'Nextcloud 8.1.2', 'downloadLink' => 'https://downloads.nextcloud.org/server', 'changes' => [], 'updaterEnabled' => true, diff --git a/apps/updatenotification/tests/UpdateCheckerTest.php b/apps/updatenotification/tests/UpdateCheckerTest.php index 16861eea54e..fc70d2d9451 100644 --- a/apps/updatenotification/tests/UpdateCheckerTest.php +++ b/apps/updatenotification/tests/UpdateCheckerTest.php @@ -51,8 +51,8 @@ class UpdateCheckerTest extends TestCase { ->expects($this->once()) ->method('check') ->willReturn([ - 'version' => 123, - 'versionstring' => 'Nextcloud 123', + 'version' => '1.2.3', + 'versionstring' => 'Nextcloud 1.2.3', 'web'=> 'javascript:alert(1)', 'url'=> 'javascript:alert(2)', 'changes' => 'javascript:alert(3)', @@ -62,7 +62,8 @@ class UpdateCheckerTest extends TestCase { $expected = [ 'updateAvailable' => true, - 'updateVersion' => 'Nextcloud 123', + 'updateVersion' => '1.2.3', + 'updateVersionString' => 'Nextcloud 1.2.3', 'updaterEnabled' => false, 'versionIsEol' => true, ]; @@ -91,8 +92,8 @@ class UpdateCheckerTest extends TestCase { ->expects($this->once()) ->method('check') ->willReturn([ - 'version' => '123', - 'versionstring' => 'Nextcloud 123', + 'version' => '1.2.3', + 'versionstring' => 'Nextcloud 1.2.3', 'web'=> 'https://docs.nextcloud.com/myUrl', 'url'=> 'https://downloads.nextcloud.org/server', 'changes' => 'https://updates.nextcloud.com/changelog_server/?version=123.0.0', @@ -106,7 +107,8 @@ class UpdateCheckerTest extends TestCase { $expected = [ 'updateAvailable' => true, - 'updateVersion' => 'Nextcloud 123', + 'updateVersion' => '1.2.3', + 'updateVersionString' => 'Nextcloud 1.2.3', 'updaterEnabled' => true, 'versionIsEol' => false, 'updateLink' => 'https://docs.nextcloud.com/myUrl', |