aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2016-01-02 12:46:52 +0100
committerNicolas Lœuillet <nicolas@loeuillet.org>2016-01-02 12:46:52 +0100
commitdad1c546a521159ca65a5a7649651d37728f0e55 (patch)
treef1d59eb83b45adb83bb21726374133a399d3c740 /src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
parent5432f6150939af6e7d2e8bf0faea0576491aaed0 (diff)
parent6be9750155fa731d75898b4973a126a090345c2d (diff)
downloadwallabag-dad1c546a521159ca65a5a7649651d37728f0e55.tar.gz
wallabag-dad1c546a521159ca65a5a7649651d37728f0e55.tar.zst
wallabag-dad1c546a521159ca65a5a7649651d37728f0e55.zip
Merge pull request #1545 from wallabag/v2-user-tag
v2 – Remove user reference in tag
Diffstat (limited to 'src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php')
-rw-r--r--src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
index bdd36e0c..22894a77 100644
--- a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
+++ b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
@@ -208,7 +208,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
208 208
209 $tags = array(); 209 $tags = array();
210 foreach ($entry->getTags() as $tag) { 210 foreach ($entry->getTags() as $tag) {
211 $tags[] = array('id' => $tag->getId(), 'label' => $tag->getLabel()); 211 $tags[] = array('id' => $tag->getId(), 'label' => $tag->getLabel(), 'slug' => $tag->getSlug());
212 } 212 }
213 213
214 $this->client->request('GET', '/api/entries/'.$entry->getId().'/tags'); 214 $this->client->request('GET', '/api/entries/'.$entry->getId().'/tags');
@@ -309,5 +309,13 @@ class WallabagRestControllerTest extends WallabagApiTestCase
309 309
310 $this->assertArrayHasKey('label', $content); 310 $this->assertArrayHasKey('label', $content);
311 $this->assertEquals($tag['label'], $content['label']); 311 $this->assertEquals($tag['label'], $content['label']);
312 $this->assertEquals($tag['slug'], $content['slug']);
313
314 $entries = $entry = $this->client->getContainer()
315 ->get('doctrine.orm.entity_manager')
316 ->getRepository('WallabagCoreBundle:Entry')
317 ->findAllByTagId($this->user->getId(), $tag['id']);
318
319 $this->assertCount(0, $entries);
312 } 320 }
313} 321}