]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
Add test for RabbitMQ
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / ReadabilityControllerTest.php
index fb39356a140c1b128566c35e0e011629e4a7f7d9..e12a723d3510a11889fa2fe8f7f5efcd1e199b8b 100644 (file)
@@ -19,6 +19,22 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
         $this->assertEquals(1, $crawler->filter('input[type=file]')->count());
     }
 
+    public function testImportReadabilityWithRabbitEnabled()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $client->getContainer()->get('craue_config')->set('rabbitmq', 1);
+
+        $crawler = $client->request('GET', '/import/readability');
+
+        $this->assertEquals(200, $client->getResponse()->getStatusCode());
+        $this->assertEquals(1, $crawler->filter('form[name=upload_import_file] > button[type=submit]')->count());
+        $this->assertEquals(1, $crawler->filter('input[type=file]')->count());
+
+        $client->getContainer()->get('craue_config')->set('rabbitmq', 0);
+    }
+
     public function testImportReadabilityWithFile()
     {
         $this->logInAs('admin');