koel/tests/Feature/RecentlyPlayedSongTest.php
2023-08-20 12:49:45 +02:00

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]);
}
}