]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
add test to check empty fields
authorNicolas Lœuillet <nicolas.loeuillet@smile.fr>
Fri, 5 Feb 2016 13:39:52 +0000 (14:39 +0100)
committerNicolas Lœuillet <nicolas.loeuillet@smile.fr>
Fri, 5 Feb 2016 13:39:52 +0000 (14:39 +0100)
src/Wallabag/ImportBundle/Tests/Controller/WallabagV2ControllerTest.php

index a77c0f6b901ce3aea853927d719f9a3f08c2e943..49b4703ed321947d7f47b062e4bc1db055b5d9d8 100644 (file)
@@ -41,6 +41,18 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
 
         $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
         $this->assertContains('Import summary', $alert[0]);
+
+        $content = $client->getContainer()
+            ->get('doctrine.orm.entity_manager')
+            ->getRepository('WallabagCoreBundle:Entry')
+            ->findByUrlAndUserId(
+                'http://www.liberation.fr/planete/2015/10/26/refugies-l-ue-va-creer-100-000-places-d-accueil-dans-les-balkans_1408867',
+                $this->getLoggedInUserId()
+            );
+
+        $this->assertEquals('', $content->getMimetype());
+        $this->assertEquals('', $content->getPreviewPicture());
+        $this->assertEquals('', $content->getLanguage());
     }
 
     public function testImportWallabagWithEmptyFile()