]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Controller/SecurityControllerTest.php
Allow login by email
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Controller / SecurityControllerTest.php
index 08f4676ed010d2b3db60410c6bbc4fe4a057dff4..395208a2fe263b3cfe977e03ad5271250f8ce016 100644 (file)
@@ -6,6 +6,16 @@ use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
 
 class SecurityControllerTest extends WallabagCoreTestCase
 {
+    public function testLoginWithEmail()
+    {
+        $this->logInAsUsingHttp('bigboss@wallabag.org');
+        $client = $this->getClient();
+        $client->followRedirects();
+
+        $crawler = $client->request('GET', '/config');
+        $this->assertContains('config.form_rss.description', $crawler->filter('body')->extract(['_text'])[0]);
+    }
+
     public function testLoginWithout2Factor()
     {
         $this->logInAs('admin');
@@ -81,7 +91,7 @@ class SecurityControllerTest extends WallabagCoreTestCase
         }
 
         $client->followRedirects();
-        $crawler = $client->request('GET', '/register');
-        $this->assertContains('registration.submit', $crawler->filter('body')->extract(['_text'])[0]);
+        $client->request('GET', '/register');
+        $this->assertContains('registration.submit', $client->getResponse()->getContent());
     }
 }