mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Test for GET on empty database
This commit is contained in:
parent
f59f45d740
commit
68c6f1bd7f
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Tests\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class WallabagRestControllerTest extends WebTestCase
|
||||
{
|
||||
public function testEmptyGetEntries() {
|
||||
$client = $this->createClient();
|
||||
$client->request('GET', '/api/entries');
|
||||
$this->assertTrue($client->getResponse()->isOk());
|
||||
|
||||
$this->assertTrue(
|
||||
$client->getResponse()->headers->contains(
|
||||
'Content-Type',
|
||||
'application/json'
|
||||
)
|
||||
);
|
||||
$this->assertEquals('[]', $client->getResponse()->getContent());
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue