From 015c7a8359c950f9621b38b11c3973860a981da8 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 11 Sep 2016 20:24:04 +0200 Subject: Add more tests And ability to define how many messages can be hanle by the redis worker before stopping (usefull for tests) --- .../Controller/WallabagV2ControllerTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php') diff --git a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php index 36e5221d..b20226ad 100644 --- a/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php +++ b/tests/Wallabag/ImportBundle/Controller/WallabagV2ControllerTest.php @@ -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'); -- cgit v1.2.3