mirror of
https://github.com/koel/koel
synced 2024-11-14 16:37:28 +00:00
27 lines
601 B
PHP
27 lines
601 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Http\Resources\ArtistResource;
|
|
use App\Models\Artist;
|
|
use PHPUnit\Framework\Attributes\Test;
|
|
use Tests\TestCase;
|
|
|
|
class ArtistTest extends TestCase
|
|
{
|
|
#[Test]
|
|
public function index(): void
|
|
{
|
|
Artist::factory(10)->create();
|
|
|
|
$this->getAs('api/artists')
|
|
->assertJsonStructure(ArtistResource::PAGINATION_JSON_STRUCTURE);
|
|
}
|
|
|
|
#[Test]
|
|
public function show(): void
|
|
{
|
|
$this->getAs('api/artists/' . Artist::factory()->create()->id)
|
|
->assertJsonStructure(ArtistResource::JSON_STRUCTURE);
|
|
}
|
|
}
|