Merge pull request #1312 from wallabag/v2-fix-1311

fix #1311, redirect after login
This commit is contained in:
Jeremy Benoist 2015-08-12 13:21:16 +02:00
commit a15692b1b7
2 changed files with 21 additions and 2 deletions

View file

@ -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

View file

@ -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();