]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Controller/TagControllerTest.php
TagController: ignore ActionMarkAsRead when removing tag from entry
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Controller / TagControllerTest.php
index c3b22dcd2c41fb2aa148ed09ca6e43ffe77bd804..e36d3924a91da9eb1f92755429e1656b6e4effdb 100644 (file)
@@ -126,9 +126,13 @@ class TagControllerTest extends WallabagCoreTestCase
             ->getRepository('WallabagCoreBundle:Tag')
             ->findOneByEntryAndTagLabel($entry, $this->tagName);
 
+        // We make a first request to set an history and test redirection after tag deletion
+        $client->request('GET', '/view/'.$entry->getId());
+        $entryUri = $client->getRequest()->getUri();
         $client->request('GET', '/remove-tag/'.$entry->getId().'/'.$tag->getId());
 
         $this->assertEquals(302, $client->getResponse()->getStatusCode());
+        $this->assertEquals($entryUri, $client->getResponse()->getTargetUrl());
 
         $this->assertNotContains($this->tagName, $entry->getTags());