]> BookStack Code Mirror - bookstack/blobdiff - tests/Api/ShelvesApiTest.php
Removed redundant null check
[bookstack] / tests / Api / ShelvesApiTest.php
index 95b165402ccd612b3ce2659f5376a2731ed5550d..fbfc17cb4da6af0b8c55fcbf9cdde7f19b5ac10a 100644 (file)
@@ -7,12 +7,10 @@ use BookStack\Entities\Models\Bookshelf;
 use Carbon\Carbon;
 use Illuminate\Support\Facades\DB;
 use Tests\TestCase;
-use Tests\Uploads\UsesImages;
 
 class ShelvesApiTest extends TestCase
 {
     use TestsApi;
-    use UsesImages;
 
     protected string $baseEndpoint = '/api/shelves';
 
@@ -154,7 +152,7 @@ class ShelvesApiTest extends TestCase
         /** @var Book $shelf */
         $shelf = Bookshelf::visible()->first();
         $this->assertNull($shelf->cover);
-        $file = $this->getTestImage('image.png');
+        $file = $this->files->uploadedImage('image.png');
 
         // Ensure cover image can be set via API
         $resp = $this->call('PUT', $this->baseEndpoint . "/{$shelf->id}", [
@@ -167,7 +165,7 @@ class ShelvesApiTest extends TestCase
 
         // Ensure further updates without image do not clear cover image
         $resp = $this->put($this->baseEndpoint . "/{$shelf->id}", [
-            'name' => 'My updated shelf again'
+            'name' => 'My updated shelf again',
         ]);
         $shelf->refresh();