]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/WallabagV1ControllerTest.php
Add test for RabbitMQ
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / WallabagV1ControllerTest.php
index ff1bf6f050580809414af7e42db25abac861c4d5..96556717933447e343210ae770cc84b7a84ec9d2 100644 (file)
@@ -19,6 +19,22 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
         $this->assertEquals(1, $crawler->filter('input[type=file]')->count());
     }
 
+    public function testImportWallabagWithRabbitEnabled()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $client->getContainer()->get('craue_config')->set('rabbitmq', 1);
+
+        $crawler = $client->request('GET', '/import/wallabag-v1');
+
+        $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 testImportWallabagWithFile()
     {
         $this->logInAs('admin');