koel/tests/Feature/SongSearchTest.php

18 lines
348 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;
2024-01-09 18:34:40 +00:00
use Tests\TestCase;
2022-07-27 10:04:04 +00:00
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]);
}
}