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

Fixed faulty baseUrl rewrites

Fixes #1452
May help #1377
This commit is contained in:
Dan Brown
2019-05-19 16:25:05 +01:00
parent 5470a9e035
commit 8ae35f645a
3 changed files with 31 additions and 4 deletions

View File

@ -1,5 +1,6 @@
<?php namespace Tests;
use BookStack\Entities\Page;
use BookStack\Notifications\ConfirmEmail;
use BookStack\Auth\User;
use BookStack\Settings\SettingService;
@ -334,6 +335,17 @@ class AuthTest extends BrowserKitTest
->seeLink('Sign up');
}
public function test_login_redirects_to_initially_requested_url_correctly()
{
config()->set('app.url', 'http://localhost');
$page = Page::query()->first();
$this->visit($page->getUrl())
->seePageUrlIs(baseUrl('/login'));
$this->login('admin@admin.com', 'password')
->seePageUrlIs($page->getUrl());
}
/**
* Perform a login
* @param string $email