diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-10 00:25:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 00:25:53 +0200 |
commit | 9fbdb0efe895f7cfe03f613cc6fa5daee9f99dfe (patch) | |
tree | 88cb3bee5f36ee82e15dd53792f3564dbf67f349 /tests | |
parent | 2b04b58d9a16d99acbcf8624ae0f01aa1c109de9 (diff) | |
parent | 5c343464799346a1caf0cd6540e7d6510df255c6 (diff) | |
download | nextcloud-server-9fbdb0efe895f7cfe03f613cc6fa5daee9f99dfe.tar.gz nextcloud-server-9fbdb0efe895f7cfe03f613cc6fa5daee9f99dfe.zip |
Merge pull request #529 from nextcloud/vendor-maintenance-downgrade
Allow downgrades of maintenance accross vendors
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/UpdaterTest.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php index 643a18cc714..e45a9f08243 100644 --- a/tests/lib/UpdaterTest.php +++ b/tests/lib/UpdaterTest.php @@ -137,6 +137,12 @@ class UpdaterTest extends \Test\TestCase { ['8.1.0.0', '8.2.0.0', '8.1', true, true], ['8.2.0.1', '8.2.0.1', '8.1', true, true], ['8.3.0.0', '8.2.0.0', '8.1', true, true], + + // Downgrade of maintenance + ['9.0.53.0', '9.0.4.0', '8.1', false, false, 'nextcloud'], + // with vendor switch + ['9.0.53.0', '9.0.4.0', '8.1', true, false, ''], + ['9.0.53.0', '9.0.4.0', '8.1', true, false, 'owncloud'], ]; } @@ -148,12 +154,17 @@ class UpdaterTest extends \Test\TestCase { * @param string $allowedVersion * @param bool $result * @param bool $debug + * @param string $vendor */ - public function testIsUpgradePossible($oldVersion, $newVersion, $allowedVersion, $result, $debug = false) { + public function testIsUpgradePossible($oldVersion, $newVersion, $allowedVersion, $result, $debug = false, $vendor = 'nextcloud') { $this->config->expects($this->any()) ->method('getSystemValue') ->with('debug', false) ->willReturn($debug); + $this->config->expects($this->any()) + ->method('getAppValue') + ->with('core', 'vendor', '') + ->willReturn($vendor); $this->assertSame($result, $this->updater->isUpgradePossible($oldVersion, $newVersion, $allowedVersion)); } |