mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Cleanup tests
- WallabagRestController: remove the tag deletion from the API since we can't remove a tag now, we only remove reference to entries - RuleBasedTaggerTest: remove workaround for asserting tag are equal since problem was related to mock expects (_call instead of findOneByLabel which was removed from the tag repository)
This commit is contained in:
parent
01fddd0cb2
commit
1bb1939ab7
2 changed files with 1 additions and 6 deletions
|
@ -337,10 +337,6 @@ class WallabagRestController extends FOSRestController
|
||||||
->getRepository('WallabagCoreBundle:Entry')
|
->getRepository('WallabagCoreBundle:Entry')
|
||||||
->removeTag($this->getUser()->getId(), $tag);
|
->removeTag($this->getUser()->getId(), $tag);
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
|
||||||
$em->remove($tag);
|
|
||||||
$em->flush();
|
|
||||||
|
|
||||||
$json = $this->get('serializer')->serialize($tag, 'json');
|
$json = $this->get('serializer')->serialize($tag, 'json');
|
||||||
|
|
||||||
return $this->renderJsonResponse($json);
|
return $this->renderJsonResponse($json);
|
||||||
|
|
|
@ -98,7 +98,6 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase
|
||||||
$user = $this->getUser([$taggingRule]);
|
$user = $this->getUser([$taggingRule]);
|
||||||
$entry = new Entry($user);
|
$entry = new Entry($user);
|
||||||
$tag = new Tag();
|
$tag = new Tag();
|
||||||
$tag->setLabel('foo');
|
|
||||||
|
|
||||||
$this->rulerz
|
$this->rulerz
|
||||||
->expects($this->once())
|
->expects($this->once())
|
||||||
|
@ -118,7 +117,7 @@ class RuleBasedTaggerTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertFalse($entry->getTags()->isEmpty());
|
$this->assertFalse($entry->getTags()->isEmpty());
|
||||||
|
|
||||||
$tags = $entry->getTags();
|
$tags = $entry->getTags();
|
||||||
$this->assertSame($tag->getLabel(), $tags[0]->getLabel());
|
$this->assertSame($tag, $tags[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSameTagWithDifferentfMatchingRules()
|
public function testSameTagWithDifferentfMatchingRules()
|
||||||
|
|
Loading…
Reference in a new issue