mirror of
https://github.com/koel/koel
synced 2024-11-28 06:50:27 +00:00
21 lines
430 B
PHP
21 lines
430 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Models\Interaction;
|
|
use Tests\TestCase;
|
|
|
|
use function Tests\create_user;
|
|
|
|
class RecentlyPlayedSongTest extends TestCase
|
|
{
|
|
public function testIndex(): void
|
|
{
|
|
$user = create_user();
|
|
|
|
Interaction::factory(5)->for($user)->create();
|
|
|
|
$this->getAs('api/songs/recently-played', $user)
|
|
->assertJsonStructure(['*' => SongTest::JSON_STRUCTURE]);
|
|
}
|
|
}
|