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

index 49b4703ed321947d7f47b062e4bc1db055b5d9d8..617c0517797702d88728f53e422ebff5eedbc994 100644 (file)
@@ -50,9 +50,21 @@ class WallabagV2ControllerTest extends WallabagCoreTestCase
                 $this->getLoggedInUserId()
             );
 
-        $this->assertEquals('', $content->getMimetype());
-        $this->assertEquals('', $content->getPreviewPicture());
-        $this->assertEquals('', $content->getLanguage());
+        $this->assertEmpty($content->getMimetype());
+        $this->assertEmpty($content->getPreviewPicture());
+        $this->assertEmpty($content->getLanguage());
+
+        $content = $client->getContainer()
+            ->get('doctrine.orm.entity_manager')
+            ->getRepository('WallabagCoreBundle:Entry')
+            ->findByUrlAndUserId(
+                'https://www.mediapart.fr/',
+                $this->getLoggedInUserId()
+            );
+
+        $this->assertNotEmpty($content->getMimetype());
+        $this->assertNotEmpty($content->getPreviewPicture());
+        $this->assertNotEmpty($content->getLanguage());
     }
 
     public function testImportWallabagWithEmptyFile()