]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/ReadabilityControllerTest.php
Add more tests
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / ReadabilityControllerTest.php
index 69635382083689adc83fa787f4e77e68cb4160a4..fb835f62d18e3ee6348af8ee6fc55c3313570e32 100644 (file)
@@ -51,6 +51,23 @@ class ReadabilityControllerTest extends WallabagCoreTestCase
         $client->getContainer()->get('craue_config')->set('import_with_redis', 0);
     }
 
+    public function testImportReadabilityBadFile()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $crawler = $client->request('GET', '/import/readability');
+        $form = $crawler->filter('form[name=upload_import_file] > button[type=submit]')->form();
+
+        $data = [
+            'upload_import_file[file]' => '',
+        ];
+
+        $client->submit($form, $data);
+
+        $this->assertEquals(200, $client->getResponse()->getStatusCode());
+    }
+
     public function testImportReadabilityWithFile()
     {
         $this->logInAs('admin');