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