1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +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

@@ -8,12 +8,9 @@ use BookStack\Entities\Models\Bookshelf;
use BookStack\Uploads\Image;
use Illuminate\Support\Str;
use Tests\TestCase;
use Tests\Uploads\UsesImages;
class BookShelfTest extends TestCase
{
use UsesImages;
public function test_shelves_shows_in_header_if_have_view_permissions()
{
$viewer = $this->users->viewer();
@@ -114,7 +111,7 @@ class BookShelfTest extends TestCase
'description' => 'Test book description ' . Str::random(10),
];
$imageFile = $this->getTestImage('shelf-test.png');
$imageFile = $this->files->uploadedImage('shelf-test.png');
$resp = $this->asEditor()->call('POST', '/shelves', $shelfInfo, [], ['image' => $imageFile]);
$resp->assertRedirect();