Files
BookStack/tests/Api/SystemApiTest.php
Dan Brown 7650ebf2f9
Some checks failed
analyse-php / build (push) Has been cancelled
lint-js / build (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
Deps: Updated composer/npm packages, fixed test namespace
2025-05-27 15:53:46 +01:00

23 lines
603 B
PHP

<?php
namespace Tests\Api;
use Tests\TestCase;
class SystemApiTest extends TestCase
{
use TestsApi;
public function test_read_returns_app_info(): void
{
$resp = $this->actingAsApiEditor()->get('/api/system');
$data = $resp->json();
$this->assertStringStartsWith('v', $data['version']);
$this->assertEquals(setting('instance-id'), $data['instance_id']);
$this->assertEquals(setting('app-name'), $data['app_name']);
$this->assertEquals(url('/logo.png'), $data['app_logo']);
$this->assertEquals(url('/'), $data['base_url']);
}
}