feat(test|api): add SongSearch tests

This commit is contained in:
Phan An 2022-07-27 12:04:04 +02:00
parent 42860cc221
commit 93651a8e14
No known key found for this signature in database
GPG key ID: A81E4477F0BB6FDC

View 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]);
}
}