aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-20 20:29:33 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-06 20:50:30 +0100
commit0a018fe03980b35c9f7aca838e67a8efa43b7f2d (patch)
treed531ff5c3051871dd5315e26e50ec45c7da2b16b /src/Wallabag/CoreBundle/Tests
parent6d37a7e6c11666c2c220c9eb358a877f15bcfa0e (diff)
downloadwallabag-0a018fe03980b35c9f7aca838e67a8efa43b7f2d.tar.gz
wallabag-0a018fe03980b35c9f7aca838e67a8efa43b7f2d.tar.zst
wallabag-0a018fe03980b35c9f7aca838e67a8efa43b7f2d.zip
add relation between entry and tag
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php29
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}