mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Merge pull request #1312 from wallabag/v2-fix-1311
fix #1311, redirect after login
This commit is contained in:
commit
a15692b1b7
2 changed files with 21 additions and 2 deletions
|
@ -37,9 +37,9 @@ security:
|
|||
|
||||
post_only: true
|
||||
|
||||
always_use_default_target_path: true
|
||||
always_use_default_target_path: false
|
||||
default_target_path: /
|
||||
target_path_parameter: redirect_url
|
||||
target_path_parameter: _target_path
|
||||
use_referer: true
|
||||
|
||||
failure_path: null
|
||||
|
|
|
@ -40,6 +40,25 @@ class SecurityControllerTest extends WallabagCoreTestCase
|
|||
$this->assertContains('Bad credentials', $client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
public function testRedirectionAfterLogin()
|
||||
{
|
||||
$client = $this->getClient();
|
||||
$client->followRedirects();
|
||||
|
||||
$crawler = $client->request('GET', '/config');
|
||||
|
||||
$form = $crawler->filter('button[type=submit]')->form();
|
||||
|
||||
$data = array(
|
||||
'_username' => 'admin',
|
||||
'_password' => 'mypassword',
|
||||
);
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
$this->assertContains('RSS', $client->getResponse()->getContent());
|
||||
}
|
||||
|
||||
public function testForgotPassword()
|
||||
{
|
||||
$client = $this->getClient();
|
||||
|
|
Loading…
Reference in a new issue