]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
Fix the way to remove a tag from all user entries
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Tests / Controller / WallabagRestControllerTest.php
index a7120e835eb96e9a22f3ee87301a4cf18dbea9f0..22894a77f756e6ededda60123699abeb30b80b21 100644 (file)
@@ -310,5 +310,12 @@ class WallabagRestControllerTest extends WallabagApiTestCase
         $this->assertArrayHasKey('label', $content);
         $this->assertEquals($tag['label'], $content['label']);
         $this->assertEquals($tag['slug'], $content['slug']);
+
+        $entries = $entry = $this->client->getContainer()
+            ->get('doctrine.orm.entity_manager')
+            ->getRepository('WallabagCoreBundle:Entry')
+            ->findAllByTagId($this->user->getId(), $tag['id']);
+
+        $this->assertCount(0, $entries);
     }
 }