1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-04-21 23:42:10 +02:00

Fix update check test

This commit is contained in:
Kovah 2021-04-15 10:48:26 +02:00
parent 15bc43a006
commit 8541853832
No known key found for this signature in database
GPG Key ID: AAAA031BA9830D7B

View File

@ -16,10 +16,7 @@ class UpdateCheckTest extends TestCase
public function testSuccessfulCheck(): void
{
Http::fake([
'github.com/*' => Http::response(
[['tag_name' => 'v100.0.0']],
200
),
'*' => Http::response('v100.0.0',),
]);
$result = UpdateHelper::checkForUpdates();
@ -34,10 +31,7 @@ class UpdateCheckTest extends TestCase
public function testSuccessfulCheckWithoutVersion(): void
{
Http::fake([
'github.com/*' => Http::response(
[['tag_name' => 'v0.0.0']],
200
),
'*' => Http::response('v0.0.0'),
]);
$result = UpdateHelper::checkForUpdates();
@ -52,7 +46,7 @@ class UpdateCheckTest extends TestCase
public function testUpdateCheckWithNetworkError(): void
{
Http::fake([
'github.com/*' => Http::response([], 404),
'*' => Http::response('', 404),
]);
$result = UpdateHelper::checkForUpdates();