fix update-check unit-tests now that the current testing version is at 2.1.0-dev1

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-06-08 12:33:48 +02:00
parent ed72fd1766
commit e0fa64f897

View File

@@ -19,11 +19,14 @@ class FroxlorTest extends TestCase
$json_result = Froxlor::getLocal($admin_userdata)->checkUpdate(); $json_result = Froxlor::getLocal($admin_userdata)->checkUpdate();
$result = json_decode($json_result, true)['data']; $result = json_decode($json_result, true)['data'];
$this->assertEquals(0, $result['isnewerversion']); $this->assertContains($result['isnewerversion'] ?? -1, [0,1]);
$this->assertNotEmpty($result['version']);
if ($result['isnewerversion'] == 0) {
if (defined('DEV_FROXLOR') && DEV_FROXLOR == 1) { if (defined('DEV_FROXLOR') && DEV_FROXLOR == 1) {
$this->assertEquals("You already have the latest testing-version of Froxlor installed.", $result['additional_info']); $this->assertEquals("You already have the latest testing-version of Froxlor installed.", $result['additional_info']);
} else { } else {
$this->assertEquals("You already have the latest version of Froxlor installed.", $result['additional_info']); $this->assertEquals("You already have the latest version of Froxlor installed.", $result['additional_info']);
} }
} }
}
} }