koel/tests/Feature/SongSearchTest.php

17 lines
328 B
PHP
Raw Normal View History

2022-07-27 10:04:04 +00:00
<?php
2023-06-05 21:46:41 +00:00
namespace Tests\Feature;
2022-07-27 10:04:04 +00:00
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]);
}
}