1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-06 12:02:45 +03:00

Extracted test file handling to its own class

Closes #3995
This commit is contained in:
Dan Brown
2023-02-08 14:39:13 +00:00
parent 5d18e7df79
commit da1a66abd3
17 changed files with 293 additions and 309 deletions

View File

@@ -3,12 +3,9 @@
namespace Tests\Settings;
use Tests\TestCase;
use Tests\Uploads\UsesImages;
class SettingsTest extends TestCase
{
use UsesImages;
public function test_settings_endpoint_redirects_to_settings_view()
{
$resp = $this->asAdmin()->get('/settings');
@@ -47,7 +44,7 @@ class SettingsTest extends TestCase
public function test_updating_and_removing_app_icon()
{
$this->asAdmin();
$galleryFile = $this->getTestImage('my-app-icon.png');
$galleryFile = $this->files->uploadedImage('my-app-icon.png');
$expectedPath = public_path('uploads/images/system/' . date('Y-m') . '/my-app-icon.png');
$this->assertFalse(setting()->get('app-icon'));