aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php4
-rw-r--r--src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php3
2 files changed, 1 insertions, 6 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index c5df1e03..459c4172 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -337,10 +337,6 @@ class WallabagRestController extends FOSRestController
337 ->getRepository('WallabagCoreBundle:Entry') 337 ->getRepository('WallabagCoreBundle:Entry')
338 ->removeTag($this->getUser()->getId(), $tag); 338 ->removeTag($this->getUser()->getId(), $tag);
339 339
340 $em = $this->getDoctrine()->getManager();
341 $em->remove($tag);
342 $em->flush();
343
344 $json = $this->get('serializer')->serialize($tag, 'json'); 340 $json = $this->get('serializer')->serialize($tag, 'json');
345 341
346 return $this->renderJsonResponse($json); 342 return $this->renderJsonResponse($json);
diff --git a/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php b/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php
index cddc8b08..dee17d65 100644
--- a/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Helper/RuleBasedTaggerTest.php
@@ -98,7 +98,6 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase
98 $user = $this->getUser([$taggingRule]); 98 $user = $this->getUser([$taggingRule]);
99 $entry = new Entry($user); 99 $entry = new Entry($user);
100 $tag = new Tag(); 100 $tag = new Tag();
101 $tag->setLabel('foo');
102 101
103 $this->rulerz 102 $this->rulerz
104 ->expects($this->once()) 103 ->expects($this->once())
@@ -118,7 +117,7 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase
118 $this->assertFalse($entry->getTags()->isEmpty()); 117 $this->assertFalse($entry->getTags()->isEmpty());
119 118
120 $tags = $entry->getTags(); 119 $tags = $entry->getTags();
121 $this->assertSame($tag->getLabel(), $tags[0]->getLabel()); 120 $this->assertSame($tag, $tags[0]);
122 } 121 }
123 122
124 public function testSameTagWithDifferentfMatchingRules() 123 public function testSameTagWithDifferentfMatchingRules()