We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0580071 commit 0e69ab1Copy full SHA for 0e69ab1
tests/Api/SystemApiTest.php
@@ -0,0 +1,25 @@
1
+<?php
2
+
3
+namespace Api;
4
5
+use BookStack\Activity\ActivityType;
6
+use BookStack\Facades\Activity;
7
+use Tests\Api\TestsApi;
8
+use Tests\TestCase;
9
10
+class SystemApiTest extends TestCase
11
+{
12
+ use TestsApi;
13
14
+ public function test_read_returns_app_info(): void
15
+ {
16
+ $resp = $this->actingAsApiEditor()->get('/api/system');
17
+ $data = $resp->json();
18
19
+ $this->assertStringStartsWith('v', $data['version']);
20
+ $this->assertEquals(setting('instance-id'), $data['instance_id']);
21
+ $this->assertEquals(setting('app-name'), $data['app_name']);
22
+ $this->assertEquals(url('/logo.png'), $data['app_logo']);
23
+ $this->assertEquals(url('/'), $data['base_url']);
24
+ }
25
+}
0 commit comments