diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-01 17:15:28 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-01 17:15:28 +0200 |
commit | 6273fefd5d945de1d871815a652f5a716e12e820 (patch) | |
tree | d8dbe70b412ce1a8f0515f6623e9e27e3190741b /tests/Wallabag/ApiBundle | |
parent | c4bf7af96f52aaafd13049e74f27b368eec79bf8 (diff) | |
download | wallabag-6273fefd5d945de1d871815a652f5a716e12e820.tar.gz wallabag-6273fefd5d945de1d871815a652f5a716e12e820.tar.zst wallabag-6273fefd5d945de1d871815a652f5a716e12e820.zip |
Add an exists endpoint in API
It should allow third party to check if an url was already saved by a user
Diffstat (limited to 'tests/Wallabag/ApiBundle')
-rw-r--r-- | tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php index 101c20eb..e582e5f9 100644 --- a/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/WallabagRestControllerTest.php | |||
@@ -684,4 +684,15 @@ class WallabagRestControllerTest extends WallabagApiTestCase | |||
684 | 684 | ||
685 | $this->assertEquals(true, $content['is_starred']); | 685 | $this->assertEquals(true, $content['is_starred']); |
686 | } | 686 | } |
687 | |||
688 | public function testGetEntriesExists() | ||
689 | { | ||
690 | $this->client->request('GET', '/api/entries/exists?url=http://0.0.0.0/entry2'); | ||
691 | |||
692 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); | ||
693 | |||
694 | $content = json_decode($this->client->getResponse()->getContent(), true); | ||
695 | |||
696 | $this->assertEquals(true, $content['exists']); | ||
697 | } | ||
687 | } | 698 | } |