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

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',

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',