diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php index 0ffe7fe6..4164e516 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php | |||
@@ -150,33 +150,4 @@ class WallabagRestControllerTest extends WallabagTestCase | |||
150 | 150 | ||
151 | $this->assertEquals(404, $client->getResponse()->getStatusCode()); | 151 | $this->assertEquals(404, $client->getResponse()->getStatusCode()); |
152 | } | 152 | } |
153 | |||
154 | public function testGetOneTag() | ||
155 | { | ||
156 | $client = $this->createClient(); | ||
157 | $client->request('GET', '/api/salts/admin.json'); | ||
158 | $salt = json_decode($client->getResponse()->getContent()); | ||
159 | |||
160 | $headers = $this->generateHeaders('admin', 'test', $salt[0]); | ||
161 | |||
162 | $tag = $client->getContainer() | ||
163 | ->get('doctrine.orm.entity_manager') | ||
164 | ->getRepository('WallabagCoreBundle:Tag') | ||
165 | ->findOneByLabel('foo'); | ||
166 | |||
167 | if (!$tag) { | ||
168 | $this->markTestSkipped('No content found in db.'); | ||
169 | } | ||
170 | |||
171 | $client->request('GET', '/api/tags/'.$tag->getLabel().'.json', array(), array(), $headers); | ||
172 | |||
173 | $this->assertEquals(json_encode($tag), $client->getResponse()->getContent()); | ||
174 | |||
175 | $this->assertTrue( | ||
176 | $client->getResponse()->headers->contains( | ||
177 | 'Content-Type', | ||
178 | 'application/json' | ||
179 | ) | ||
180 | ); | ||
181 | } | ||
182 | } | 153 | } |