diff options
Diffstat (limited to 'tests/Wallabag/CoreBundle/Controller/TagControllerTest.php')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/TagControllerTest.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php index c3b22dcd..80611a87 100644 --- a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php | |||
@@ -126,9 +126,19 @@ class TagControllerTest extends WallabagCoreTestCase | |||
126 | ->getRepository('WallabagCoreBundle:Tag') | 126 | ->getRepository('WallabagCoreBundle:Tag') |
127 | ->findOneByEntryAndTagLabel($entry, $this->tagName); | 127 | ->findOneByEntryAndTagLabel($entry, $this->tagName); |
128 | 128 | ||
129 | // We make a first request to set an history and test redirection after tag deletion | ||
130 | $client->request('GET', '/view/'.$entry->getId()); | ||
131 | $entryUri = $client->getRequest()->getUri(); | ||
129 | $client->request('GET', '/remove-tag/'.$entry->getId().'/'.$tag->getId()); | 132 | $client->request('GET', '/remove-tag/'.$entry->getId().'/'.$tag->getId()); |
130 | 133 | ||
131 | $this->assertEquals(302, $client->getResponse()->getStatusCode()); | 134 | $this->assertEquals(302, $client->getResponse()->getStatusCode()); |
135 | $this->assertEquals($entryUri, $client->getResponse()->getTargetUrl()); | ||
136 | |||
137 | // re-retrieve the entry to be sure to get fresh data from database (mostly for tags) | ||
138 | $entry = $client->getContainer() | ||
139 | ->get('doctrine.orm.entity_manager') | ||
140 | ->getRepository('WallabagCoreBundle:Entry') | ||
141 | ->findByUrlAndUserId('http://0.0.0.0/entry1', $this->getLoggedInUserId()); | ||
132 | 142 | ||
133 | $this->assertNotContains($this->tagName, $entry->getTags()); | 143 | $this->assertNotContains($this->tagName, $entry->getTags()); |
134 | 144 | ||