mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
22 lines
471 B
PHP
22 lines
471 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Http\Resources\SongResource;
|
|
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(['*' => SongResource::JSON_STRUCTURE]);
|
|
}
|
|
}
|