aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-20 15:36:25 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-06 20:50:30 +0100
commit1d14779154481b320e1c44fccf2558d8c9fa43a1 (patch)
tree45fbcb70457459b2359828fd035bb8936442fc02 /src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
parentaa4d6562c196926a55819326b0fbe504daf2156f (diff)
downloadwallabag-1d14779154481b320e1c44fccf2558d8c9fa43a1.tar.gz
wallabag-1d14779154481b320e1c44fccf2558d8c9fa43a1.tar.zst
wallabag-1d14779154481b320e1c44fccf2558d8c9fa43a1.zip
remove isDeleted flag
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
index fcfa8ccf..4164e516 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
@@ -130,7 +130,7 @@ class WallabagRestControllerTest extends WallabagTestCase
130 $entry = $client->getContainer() 130 $entry = $client->getContainer()
131 ->get('doctrine.orm.entity_manager') 131 ->get('doctrine.orm.entity_manager')
132 ->getRepository('WallabagCoreBundle:Entry') 132 ->getRepository('WallabagCoreBundle:Entry')
133 ->findOneByIsDeleted(false); 133 ->findOneByUser(1);
134 134
135 if (!$entry) { 135 if (!$entry) {
136 $this->markTestSkipped('No content found in db.'); 136 $this->markTestSkipped('No content found in db.');
@@ -140,10 +140,14 @@ class WallabagRestControllerTest extends WallabagTestCase
140 140
141 $this->assertEquals(200, $client->getResponse()->getStatusCode()); 141 $this->assertEquals(200, $client->getResponse()->getStatusCode());
142 142
143 $res = $client->getContainer() 143 // We'll try to delete this entry again
144 ->get('doctrine.orm.entity_manager') 144 $client->request('GET', '/api/salts/admin.json');
145 ->getRepository('WallabagCoreBundle:Entry') 145 $salt = json_decode($client->getResponse()->getContent());
146 ->findOneById($entry->getId()); 146
147 $this->assertEquals($res->isDeleted(), true); 147 $headers = $this->generateHeaders('admin', 'test', $salt[0]);
148
149 $client->request('DELETE', '/api/entries/'.$entry->getId().'.json', array(), array(), $headers);
150
151 $this->assertEquals(404, $client->getResponse()->getStatusCode());
148 } 152 }
149} 153}