koel/tests/Feature/SongSearchTest.php
2023-08-20 12:49:45 +02:00

16 lines
328 B
PHP

<?php
namespace Tests\Feature;
use App\Models\Song;
class SongSearchTest extends TestCase
{
public function testSearch(): void
{
Song::factory(10)->create(['title' => 'A Foo Song']);
$this->getAs('api/search/songs?q=foo')
->assertJsonStructure(['*' => SongTest::JSON_STRUCTURE]);
}
}