]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Ensure retrieved data are fresh 3138/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 31 May 2017 09:11:02 +0000 (11:11 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 31 May 2017 09:11:02 +0000 (11:11 +0200)
tests/Wallabag/CoreBundle/Controller/TagControllerTest.php

index e36d3924a91da9eb1f92755429e1656b6e4effdb..80611a87c2010549a31d6672fce7aaf7b654df1c 100644 (file)
@@ -134,6 +134,12 @@ class TagControllerTest extends WallabagCoreTestCase
         $this->assertEquals(302, $client->getResponse()->getStatusCode());
         $this->assertEquals($entryUri, $client->getResponse()->getTargetUrl());
 
+        // re-retrieve the entry to be sure to get fresh data from database (mostly for tags)
+        $entry = $client->getContainer()
+            ->get('doctrine.orm.entity_manager')
+            ->getRepository('WallabagCoreBundle:Entry')
+            ->findByUrlAndUserId('http://0.0.0.0/entry1', $this->getLoggedInUserId());
+
         $this->assertNotContains($this->tagName, $entry->getTags());
 
         $client->request('GET', '/remove-tag/'.$entry->getId().'/'.$tag->getId());