mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-22 23:59:42 +00:00
API: Added test to cover system info endpoint
This commit is contained in:
parent
058007109e
commit
0e69ab1938
1 changed files with 25 additions and 0 deletions
25
tests/Api/SystemApiTest.php
Normal file
25
tests/Api/SystemApiTest.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace Api;
|
||||
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\Facades\Activity;
|
||||
use Tests\Api\TestsApi;
|
||||
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']);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue