1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Updated page navigation logic to ignore empty headers

Fixes #1429
This commit is contained in:
Dan Brown
2019-05-15 21:02:11 +01:00
parent 0ee9e5c4db
commit 896f88174a
3 changed files with 50 additions and 14 deletions

View File

@ -0,0 +1,19 @@
<?php namespace Tests;
class HelpersTest extends TestCase
{
public function test_base_url_takes_config_into_account()
{
config()->set('app.url', 'http://example.com/bookstack');
$result = baseUrl('/');
$this->assertEquals('http://example.com/bookstack/', $result);
}
public function test_base_url_takes_extra_path_into_account_on_forced_domain()
{
config()->set('app.url', 'http://example.com/bookstack');
$result = baseUrl('http://example.com/bookstack/', true);
$this->assertEquals('http://example.com/bookstack/', $result);
}
}