]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Tests/Controller/SecurityControllerTest.php
Merge pull request #1418 from wallabag/v2-previewpicture-filter
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / Controller / SecurityControllerTest.php
index 1dd05f89ba624fa83f5f03044b73fb379293cfe3..759ef01b0417b2e63f88d984b95f2737e6ec749f 100644 (file)
@@ -2,11 +2,11 @@
 
 namespace Wallabag\CoreBundle\Tests\Controller;
 
-use Wallabag\CoreBundle\Tests\WallabagTestCase;
 use Symfony\Component\Filesystem\Filesystem;
 use Symfony\Component\Finder\Finder;
+use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
 
-class SecurityControllerTest extends WallabagTestCase
+class SecurityControllerTest extends WallabagCoreTestCase
 {
     public function testLogin()
     {
@@ -40,6 +40,25 @@ class SecurityControllerTest extends WallabagTestCase
         $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();
@@ -69,7 +88,7 @@ class SecurityControllerTest extends WallabagTestCase
         $client = $parameters['client'];
 
         $data = array(
-            'forgot_password[email]' => 'baggy',
+            'forgot_password[email]' => 'material',
         );
 
         $client->submit($form, $data);