mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Add filter for tags on API
This commit is contained in:
parent
a314b920bf
commit
28803f106b
3 changed files with 31 additions and 2 deletions
|
@ -121,6 +121,28 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
|||
);
|
||||
}
|
||||
|
||||
public function testGetTaggedEntries()
|
||||
{
|
||||
$this->client->request('GET', '/api/entries', ['tags' => 'foo,bar']);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
|
||||
$this->assertGreaterThanOrEqual(1, count($content));
|
||||
$this->assertNotEmpty($content['_embedded']['items']);
|
||||
$this->assertGreaterThanOrEqual(1, $content['total']);
|
||||
$this->assertEquals(1, $content['page']);
|
||||
$this->assertGreaterThanOrEqual(1, $content['pages']);
|
||||
|
||||
$this->assertTrue(
|
||||
$this->client->getResponse()->headers->contains(
|
||||
'Content-Type',
|
||||
'application/json'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetDatedEntries()
|
||||
{
|
||||
$this->client->request('GET', '/api/entries', ['since' => 1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue