]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/PocketControllerTest.php
Add test for RabbitMQ
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / PocketControllerTest.php
index e0e61df88c43d5d5161128a261738bf9385c0e69..098cf3566bb0f7496cea93af4967e634e9496ff7 100644 (file)
@@ -17,6 +17,21 @@ class PocketControllerTest extends WallabagCoreTestCase
         $this->assertEquals(1, $crawler->filter('button[type=submit]')->count());
     }
 
+    public function testImportPocketWithRabbitEnabled()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $client->getContainer()->get('craue_config')->set('rabbitmq', 1);
+
+        $crawler = $client->request('GET', '/import/pocket');
+
+        $this->assertEquals(200, $client->getResponse()->getStatusCode());
+        $this->assertEquals(1, $crawler->filter('button[type=submit]')->count());
+
+        $client->getContainer()->get('craue_config')->set('rabbitmq', 0);
+    }
+
     public function testImportPocketAuthBadToken()
     {
         $this->logInAs('admin');