updates automatically handled on the background

This commit is contained in:
Čarodej
2022-04-05 16:43:12 +02:00
parent 3649b6b7cf
commit 993dfc8fa1
21 changed files with 141 additions and 243 deletions
+1
View File
@@ -157,6 +157,7 @@ class UserAccountTest extends TestCase
'role' => $user->role,
'socialite_account' => false,
'two_factor_authentication' => false,
'two_factor_confirmed_at' => null,
'storage' => [
'used' => 0,
'used_formatted' => '0%',
-2
View File
@@ -25,8 +25,6 @@ class DashboardTest extends TestCase
->assertStatus(200)
->assertJsonFragment([
'app' => [
'shouldUpgrade' => true,
'shouldUpgradeTranslations' => true,
'earnings' => '$0.00',
'isRunningCron' => false,
'license' => 'extended',
+3 -11
View File
@@ -5,6 +5,7 @@ use DB;
use Tests\TestCase;
use App\Users\Models\User;
use Illuminate\Support\Str;
use Support\Upgrading\Actions\UpdateSystemAction;
class AppUpgradeTest extends TestCase
{
@@ -39,10 +40,7 @@ class AppUpgradeTest extends TestCase
]);
});
$this
->actingAs($user)
->get('/upgrade/translations')
->assertStatus(201);
resolve(UpdateSystemAction::class)();
collect(['en', 'sk'])
->map(function ($locale) {
@@ -65,13 +63,7 @@ class AppUpgradeTest extends TestCase
*/
public function it_upgrade_app()
{
$user = User::factory()
->create(['role' => 'admin']);
$this
->actingAs($user)
->get('/upgrade/system')
->assertStatus(201);
resolve(UpdateSystemAction::class)();
$this->assertDatabaseHas('app_updates', [
'version' => '2_0_10',
+4 -5
View File
@@ -1,11 +1,10 @@
<?php
namespace Tests\Support\Demo;
use Tests\TestCase;
use App\Users\Models\User;
use Domain\Sharing\Models\Share;
use Support\Demo\Actions\DeleteAllSharedLinksAction;
use Tests\TestCase;
use Support\Demo\Actions\DeleteAllDemoSharedLinksAction;
class DemoTest extends TestCase
{
@@ -30,7 +29,7 @@ class DemoTest extends TestCase
Share::factory()
->create(['user_id' => $howdy->id]);
resolve(DeleteAllSharedLinksAction::class)();
resolve(DeleteAllDemoSharedLinksAction::class)();
$this->assertDatabaseHas('shares', [
'user_id' => $user->id,
@@ -38,4 +37,4 @@ class DemoTest extends TestCase
'user_id' => $howdy->id,
]);
}
}
}