koel/tests/Feature/V6/FavoriteTest.php

23 lines
461 B
PHP
Raw Normal View History

2022-07-26 20:41:26 +00:00
<?php
namespace Tests\Feature\V6;
use App\Models\Interaction;
use App\Models\User;
class FavoriteTest extends TestCase
{
public function testIndex(): void
{
/** @var User $user */
$user = User::factory()->create();
Interaction::factory(5)->create([
'user_id' => $user->id,
]);
$this->getAsUser('api/favorites', $user)
->assertJsonStructure(['*' => SongTest::JSON_STRUCTURE]);
}
}