mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
21 lines
530 B
PHP
21 lines
530 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Models\Song;
|
|
|
|
class QueueTest extends TestCase
|
|
{
|
|
public function testFetchSongs(): void
|
|
{
|
|
Song::factory(10)->create();
|
|
|
|
$this->getAs('api/queue/fetch?order=rand&limit=5')
|
|
->assertJsonStructure(['*' => SongTest::JSON_STRUCTURE])
|
|
->assertJsonCount(5, '*');
|
|
|
|
$this->getAs('api/queue/fetch?order=asc&sort=title&limit=5')
|
|
->assertJsonStructure(['*' => SongTest::JSON_STRUCTURE])
|
|
->assertJsonCount(5, '*');
|
|
}
|
|
}
|