]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php
Add more tests
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Controller / WallabagV2ControllerTest.php
index 36e5221d6d0bebf508c5c5515353c2a0c9f62a01..b20226ad183469e398da44cc96e1435acbe12723 100644 (file)
@@ -51,6 +51,23 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
         $client->getContainer()->get('craue_config')->set('import_with_redis', 0);
     }
 
+    public function testImportWallabagBadFile()
+    {
+        $this->logInAs('admin');
+        $client = $this->getClient();
+
+        $crawler = $client->request('GET', '/import/wallabag-v2');
+        $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 testImportWallabagWithFile()
     {
         $this->logInAs('admin');