aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-05-31 11:11:02 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-05-31 11:11:02 +0200
commit31485bddb98a2a1b434e62e02ffd79614eca9db8 (patch)
tree3323d11d6f9cfa6c82667becf8771776dcb87bea
parent5dbf3f2326c4054782304b9a41d773a1100acf48 (diff)
downloadwallabag-31485bddb98a2a1b434e62e02ffd79614eca9db8.tar.gz
wallabag-31485bddb98a2a1b434e62e02ffd79614eca9db8.tar.zst
wallabag-31485bddb98a2a1b434e62e02ffd79614eca9db8.zip
Ensure retrieved data are fresh
-rw-r--r--tests/Wallabag/CoreBundle/Controller/TagControllerTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php
index e36d3924..80611a87 100644
--- a/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/TagControllerTest.php
@@ -134,6 +134,12 @@ class TagControllerTest extends WallabagCoreTestCase
134 $this->assertEquals(302, $client->getResponse()->getStatusCode()); 134 $this->assertEquals(302, $client->getResponse()->getStatusCode());
135 $this->assertEquals($entryUri, $client->getResponse()->getTargetUrl()); 135 $this->assertEquals($entryUri, $client->getResponse()->getTargetUrl());
136 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());
142
137 $this->assertNotContains($this->tagName, $entry->getTags()); 143 $this->assertNotContains($this->tagName, $entry->getTags());
138 144
139 $client->request('GET', '/remove-tag/'.$entry->getId().'/'.$tag->getId()); 145 $client->request('GET', '/remove-tag/'.$entry->getId().'/'.$tag->getId());