Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-07-22 15:44:00 +0300
committerJoas Schilling <coding@schilljs.com>2016-07-22 15:51:43 +0300
commit5c343464799346a1caf0cd6540e7d6510df255c6 (patch)
tree37b3cfdfbf7727636fa07359da2bf7d47715aa9a /tests/lib/UpdaterTest.php
parentaf3950146504fe0a14ef38c24c549ffeda74acf6 (diff)
Allow downgrades of maintenance accross vendors
Diffstat (limited to 'tests/lib/UpdaterTest.php')
-rw-r--r--tests/lib/UpdaterTest.php13
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));
}