forked from wallabag/wallabag
Merge remote-tracking branch 'origin/2.5.x'
This commit is contained in:
@ -58,7 +58,7 @@ class ExportControllerTest extends WallabagCoreTestCase
|
||||
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testBadEntryId()
|
||||
public function testNonExistingEntryId()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
@ -68,6 +68,21 @@ class ExportControllerTest extends WallabagCoreTestCase
|
||||
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testForbiddenEntryId()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
|
||||
$content = $client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository(Entry::class)
|
||||
->findOneByUsernameAndNotArchived('bob');
|
||||
|
||||
$client->request('GET', '/export/' . $content->getId() . '.mobi');
|
||||
|
||||
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testEpubExport()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
|
||||
Reference in New Issue
Block a user