Make sure we have no media for the empty response test
This commit is contained in:
parent
b764066d98
commit
cd345d4f88
1 changed files with 6 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
namespace Tests\Feature;
|
||||
|
||||
use App\Jobs\ProcessMedia;
|
||||
use App\Models\Media;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Queue;
|
||||
|
@ -18,6 +19,11 @@ class MicropubMediaTest extends TestCase
|
|||
/** @test */
|
||||
public function emptyResponseForLastUploadWhenNoneFound()
|
||||
{
|
||||
// Make sure there’s no media
|
||||
Media::all()->each(function ($media) {
|
||||
$media->delete();
|
||||
});
|
||||
|
||||
$response = $this->get(
|
||||
'/api/media?q=last',
|
||||
['HTTP_Authorization' => 'Bearer ' . $this->getToken()]
|
||||
|
|
Loading…
Add table
Reference in a new issue