mirror of
https://github.com/koel/koel
synced 2024-12-18 16:44:03 +00:00
24 lines
546 B
PHP
24 lines
546 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Http\Resources\ArtistResource;
|
|
use App\Models\Artist;
|
|
use Tests\TestCase;
|
|
|
|
class ArtistTest extends TestCase
|
|
{
|
|
public function testIndex(): void
|
|
{
|
|
Artist::factory(10)->create();
|
|
|
|
$this->getAs('api/artists')
|
|
->assertJsonStructure(ArtistResource::PAGINATION_JSON_STRUCTURE);
|
|
}
|
|
|
|
public function testShow(): void
|
|
{
|
|
$this->getAs('api/artists/' . Artist::factory()->create()->id)
|
|
->assertJsonStructure(ArtistResource::JSON_STRUCTURE);
|
|
}
|
|
}
|