forked from wallabag/wallabag
Merge remote-tracking branch 'origin/master' into 2.6.0
This commit is contained in:
@ -159,6 +159,25 @@ class EntryRestControllerTest extends WallabagApiTestCase
|
||||
$this->assertSame('application/json', $this->client->getResponse()->headers->get('Content-Type'));
|
||||
}
|
||||
|
||||
public function testGetEntriesByDomainName()
|
||||
{
|
||||
$this->client->request('GET', '/api/entries?domain_name=domain.io');
|
||||
|
||||
$this->assertSame(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->assertSame(1, $content['page']);
|
||||
$this->assertGreaterThanOrEqual(1, $content['pages']);
|
||||
|
||||
$this->assertSame('test title entry6', $content['_embedded']['items'][0]['title']);
|
||||
|
||||
$this->assertSame('application/json', $this->client->getResponse()->headers->get('Content-Type'));
|
||||
}
|
||||
|
||||
public function testGetEntriesWithFullOptions()
|
||||
{
|
||||
$this->client->request('GET', '/api/entries', [
|
||||
|
||||
@ -22,14 +22,13 @@ class TagRestControllerTest extends WallabagApiTestCase
|
||||
$this->assertGreaterThan(0, $content);
|
||||
$this->assertArrayHasKey('id', $content[0]);
|
||||
$this->assertArrayHasKey('label', $content[0]);
|
||||
$this->assertArrayHasKey('nbEntries', $content[0]);
|
||||
|
||||
$tagLabels = array_map(function ($i) {
|
||||
return $i['label'];
|
||||
}, $content);
|
||||
|
||||
$this->assertNotContains($this->otherUserTagLabel, $tagLabels, 'There is a possible tag leak');
|
||||
|
||||
return end($content);
|
||||
}
|
||||
|
||||
public function testDeleteUserTag()
|
||||
|
||||
Reference in New Issue
Block a user