Fix reviews

Encrypt username too
Redirect to list after saving credentials
Fix typos

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2017-06-14 15:02:34 +02:00
committed by Jeremy Benoist
parent 906424c1b6
commit bead8b42da
11 changed files with 43 additions and 22 deletions

View File

@ -1340,7 +1340,7 @@ class EntryControllerTest extends WallabagCoreTestCase
$user = $client->getContainer()->get('security.token_storage')->getToken()->getUser();
$credential = new SiteCredential($user);
$credential->setHost('monde-diplomatique.fr');
$credential->setUsername('foo');
$credential->setUsername($client->getContainer()->get('wallabag_core.helper.crypto_proxy')->crypt('foo'));
$credential->setPassword($client->getContainer()->get('wallabag_core.helper.crypto_proxy')->crypt('bar'));
$em->persist($credential);

View File

@ -85,7 +85,6 @@ class SiteCredentialControllerTest extends WallabagCoreTestCase
$crawler = $client->followRedirect();
$this->assertContains('flashes.site_credential.notice.updated', $crawler->filter('body')->extract(['_text'])[0]);
$this->assertContains('larry', $crawler->filter('input[id=site_credential_username]')->attr('value'));
}
public function testEditFromADifferentUserSiteCredential()