mirror of
https://github.com/koel/koel
synced 2024-12-20 17:43:36 +00:00
20 lines
445 B
PHP
20 lines
445 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
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]);
|
|
}
|
|
}
|