koel/tests/Feature/V6/RecentlyPlayedSongTest.php

21 lines
444 B
PHP
Raw Normal View History

2022-07-27 09:30:04 +00:00
<?php
namespace Tests\Feature\V6;
use App\Models\Interaction;
use App\Models\User;
2022-07-27 09:30:04 +00:00
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]);
}
2022-07-27 09:30:04 +00:00
}