From 8c133451ac9f161e0f72bbbb8be8b7c43fd09f0d Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 23 Sep 2016 13:59:55 +0200 Subject: [PATCH] Revert "Fix tests" This reverts commit 997e4cf3fe297190c16ad12750e60c289c8ed088. Signed-off-by: Morris Jobke --- .../tests/UpdateCheckerTest.php | 15 ++++++--------- .../tests/controller/AdminControllerTest.php | 8 +------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/apps/updatenotification/tests/UpdateCheckerTest.php b/apps/updatenotification/tests/UpdateCheckerTest.php index d8818a2e60..e83d4c9a24 100644 --- a/apps/updatenotification/tests/UpdateCheckerTest.php +++ b/apps/updatenotification/tests/UpdateCheckerTest.php @@ -46,14 +46,13 @@ class UpdateCheckerTest extends TestCase { ->method('check') ->willReturn([ 'version' => 123, - 'versionstring' => 'Nextcloud 123', + 'versionstring' => 'ownCloud 123', 'web'=> 'javascript:alert(1)', - 'url'=> 'javascript:alert(2)', ]); $expected = [ 'updateAvailable' => true, - 'updateVersion' => 'Nextcloud 123', + 'updateVersion' => 'ownCloud 123', ]; $this->assertSame($expected, $this->updateChecker->getUpdateState()); } @@ -64,16 +63,14 @@ class UpdateCheckerTest extends TestCase { ->method('check') ->willReturn([ 'version' => 123, - 'versionstring' => 'Nextcloud 123', - 'web'=> 'https://docs.nextcloud.com/myUrl', - 'url'=> 'https://downloads.nextcloud.org/server', + 'versionstring' => 'ownCloud 123', + 'web'=> 'https://owncloud.org/myUrl', ]); $expected = [ 'updateAvailable' => true, - 'updateVersion' => 'Nextcloud 123', - 'updateLink' => 'https://docs.nextcloud.com/myUrl', - 'downloadLink' => 'https://downloads.nextcloud.org/server', + 'updateVersion' => 'ownCloud 123', + 'updateLink' => 'https://owncloud.org/myUrl', ]; $this->assertSame($expected, $this->updateChecker->getUpdateState()); } diff --git a/apps/updatenotification/tests/controller/AdminControllerTest.php b/apps/updatenotification/tests/controller/AdminControllerTest.php index ef07fbc498..18135239e9 100644 --- a/apps/updatenotification/tests/controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/controller/AdminControllerTest.php @@ -127,7 +127,6 @@ class AdminControllerTest extends TestCase { 'channels' => $channels, 'newVersionString' => '8.1.2', 'updaterRequirementsFulfilled' => true, - 'downloadLink' => '', ]; $expected = new TemplateResponse('updatenotification', 'admin', $params, ''); @@ -161,10 +160,7 @@ class AdminControllerTest extends TestCase { $this->updateChecker ->expects($this->once()) ->method('getUpdateState') - ->willReturn([ - 'updateVersion' => '8.1.2', - 'downloadLink' => 'https://downloads.nextcloud.org/server', - ]); + ->willReturn(['updateVersion' => '8.1.2']); $this->adminController ->expects($this->once()) ->method('isCompatibleWithUpdater') @@ -177,7 +173,6 @@ class AdminControllerTest extends TestCase { 'channels' => $channels, 'newVersionString' => '8.1.2', 'updaterRequirementsFulfilled' => false, - 'downloadLink' => 'https://downloads.nextcloud.org/server', ]; $expected = new TemplateResponse('updatenotification', 'admin', $params, ''); @@ -224,7 +219,6 @@ class AdminControllerTest extends TestCase { 'channels' => $channels, 'newVersionString' => '', 'updaterRequirementsFulfilled' => true, - 'downloadLink' => '', ]; $expected = new TemplateResponse('updatenotification', 'admin', $params, '');