1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Licensing: Added links and tests for new licenses endpoint

For #4907
This commit is contained in:
Dan Brown
2024-03-23 22:04:18 +00:00
parent 0c524c7c8f
commit a2fd80954b
7 changed files with 52 additions and 15 deletions

24
tests/LicensesTest.php Normal file
View File

@ -0,0 +1,24 @@
<?php
namespace Tests;
class LicensesTest extends TestCase
{
public function test_licenses_endpoint()
{
$resp = $this->get('/licenses');
$resp->assertOk();
$resp->assertSee('Licenses');
$resp->assertSee('PHP Library Licenses');
$resp->assertSee('Dan Brown and the BookStack Project contributors');
$resp->assertSee('doctrine/dbal');
$resp->assertSee('@codemirror/lang-html');
}
public function test_licenses_linked_to_from_settings()
{
$resp = $this->asAdmin()->get('/settings/features');
$html = $this->withHtml($resp);
$html->assertLinkExists(url('/licenses'), 'License Details');
}
}