mirror of
https://github.com/koel/koel
synced 2024-11-14 16:37:28 +00:00
25 lines
631 B
PHP
25 lines
631 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Models\Song;
|
|
use PHPUnit\Framework\Attributes\Test;
|
|
use Tests\TestCase;
|
|
|
|
use function Tests\create_admin;
|
|
|
|
class SongVisibilityTest extends TestCase
|
|
{
|
|
#[Test]
|
|
public function changingVisibilityIsForbiddenInCommunityEdition(): void
|
|
{
|
|
$owner = create_admin();
|
|
Song::factory(3)->create();
|
|
|
|
$this->putAs('api/songs/publicize', ['songs' => Song::query()->pluck('id')->all()], $owner)
|
|
->assertForbidden();
|
|
|
|
$this->putAs('api/songs/privatize', ['songs' => Song::query()->pluck('id')->all()], $owner)
|
|
->assertForbidden();
|
|
}
|
|
}
|