set storage driver via admin

This commit is contained in:
Čarodej
2022-03-08 09:42:18 +01:00
parent c0ca83193f
commit 4e2155b75a
9 changed files with 539 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
<?php
namespace Tests\Domain\Settings;
use Storage;
@@ -198,4 +199,26 @@ class SettingsTest extends TestCase
'smtp.encryption' => 'tls',
])->assertStatus(204);
}
/**
* @test
*/
public function it_set_storage()
{
$admin = User::factory()
->create(['role' => 'admin']);
$this
->actingAs($admin)
->postJson('/api/admin/settings/storage', [
'storage' => [
'driver' => 's3',
'key' => '123456',
'secret' => '123456',
'region' => 'frankfurt',
'bucket' => 'cloud',
'endpoint' => 'https://cloud.frankfurt.storage.com',
],
])->assertStatus(204);
}
}