]> BookStack Code Mirror - bookstack/blob - tests/Api/SystemApiTest.php
New translations notifications.php (Nepali)
[bookstack] / tests / Api / SystemApiTest.php
1 <?php
2
3 namespace Tests\Api;
4
5 use Tests\TestCase;
6
7 class SystemApiTest extends TestCase
8 {
9     use TestsApi;
10
11     public function test_read_returns_app_info(): void
12     {
13         $resp = $this->actingAsApiEditor()->get('/api/system');
14         $data = $resp->json();
15
16         $this->assertStringStartsWith('v', $data['version']);
17         $this->assertEquals(setting('instance-id'), $data['instance_id']);
18         $this->assertEquals(setting('app-name'), $data['app_name']);
19         $this->assertEquals(url('/logo.png'), $data['app_logo']);
20         $this->assertEquals(url('/'), $data['base_url']);
21     }
22 }