koel/tests/Feature/InitialDataTest.php

44 lines
1 KiB
PHP
Raw Normal View History

2022-07-26 22:27:32 +02:00
<?php
2023-06-05 23:46:41 +02:00
namespace Tests\Feature;
2022-07-26 22:27:32 +02:00
use PHPUnit\Framework\Attributes\Test;
2024-01-09 19:34:40 +01:00
use Tests\TestCase;
2024-01-11 13:41:33 +01:00
class InitialDataTest extends TestCase
2022-07-26 22:27:32 +02:00
{
#[Test]
public function index(): void
2022-07-26 22:27:32 +02:00
{
2022-07-27 10:49:33 +02:00
$this->getAs('/api/data')->assertJsonStructure([
2022-07-26 22:27:32 +02:00
'settings',
'playlists',
'playlist_folders',
2022-07-26 22:27:32 +02:00
'current_user',
2024-01-04 12:35:36 +01:00
'uses_last_fm',
'uses_you_tube',
'uses_i_tunes',
'allows_download',
2022-07-26 22:27:32 +02:00
'supports_transcoding',
'cdn_url',
'current_version',
'latest_version',
'song_count',
'song_length',
'queue_state' => [
'songs',
'current_song',
'playback_position',
],
2024-01-08 17:59:05 +01:00
'koel_plus' => [
'active',
'short_key',
'customer_name',
'customer_email',
2024-01-18 12:13:05 +01:00
'product_id',
2024-01-08 17:59:05 +01:00
],
'supports_batch_downloading',
2022-07-26 22:27:32 +02:00
]);
}
}