]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php
Merge pull request #1761 from wallabag/v2-API-version
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Tests / Controller / WallabagRestControllerTest.php
index 630b75bfe62adb2bbd21d387635e8613a027a587..a705f9dea4f00fdac5c84194f900cdc219151521 100644 (file)
@@ -336,4 +336,15 @@ class WallabagRestControllerTest extends WallabagApiTestCase
 
         $this->assertCount(0, $entries);
     }
+
+    public function testGetVersion()
+    {
+        $this->client->request('GET', '/api/version');
+
+        $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
+
+        $content = json_decode($this->client->getResponse()->getContent(), true);
+
+        $this->assertEquals($this->client->getContainer()->getParameter('wallabag_core.version'), $content);
+    }
 }