mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
feat(test|api): add SongSearch tests
This commit is contained in:
parent
42860cc221
commit
93651a8e14
1 changed files with 16 additions and 0 deletions
16
tests/Feature/V6/SongSearchTest.php
Normal file
16
tests/Feature/V6/SongSearchTest.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\Feature\V6;
|
||||
|
||||
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]);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue