mirror of
https://github.com/koel/koel
synced 2024-12-19 09:03:07 +00:00
20 lines
441 B
PHP
20 lines
441 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Models\Interaction;
|
|
use App\Models\User;
|
|
|
|
class RecentlyPlayedSongTest extends TestCase
|
|
{
|
|
public function testIndex(): void
|
|
{
|
|
/** @var User $user */
|
|
$user = User::factory()->create();
|
|
|
|
Interaction::factory(5)->for($user)->create();
|
|
|
|
$this->getAs('api/songs/recently-played', $user)
|
|
->assertJsonStructure(['*' => SongTest::JSON_STRUCTURE]);
|
|
}
|
|
}
|