mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-09 16:35:27 +00:00
tests: fix broken session clients for rest entry deletion tests
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
508302042f
commit
12a97c3522
1 changed files with 13 additions and 4 deletions
|
@ -426,9 +426,10 @@ class EntryRestControllerTest extends WallabagApiTestCase
|
||||||
$this->assertSame($e['id'], $content['id']);
|
$this->assertSame($e['id'], $content['id']);
|
||||||
|
|
||||||
// We'll try to delete this entry again
|
// We'll try to delete this entry again
|
||||||
$this->client->request('DELETE', '/api/entries/' . $e['id'] . '.json');
|
$client = $this->createAuthorizedClient();
|
||||||
|
$client->request('DELETE', '/api/entries/' . $e['id'] . '.json');
|
||||||
|
|
||||||
$this->assertSame(404, $this->client->getResponse()->getStatusCode());
|
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDeleteEntryExpectId()
|
public function testDeleteEntryExpectId()
|
||||||
|
@ -453,9 +454,17 @@ class EntryRestControllerTest extends WallabagApiTestCase
|
||||||
$this->assertArrayNotHasKey('url', $content);
|
$this->assertArrayNotHasKey('url', $content);
|
||||||
|
|
||||||
// We'll try to delete this entry again
|
// We'll try to delete this entry again
|
||||||
$this->client->request('DELETE', '/api/entries/' . $id . '.json');
|
$client = $this->createAuthorizedClient();
|
||||||
|
$client->request('DELETE', '/api/entries/' . $id . '.json');
|
||||||
|
|
||||||
$this->assertSame(404, $this->client->getResponse()->getStatusCode());
|
$this->assertSame(404, $client->getResponse()->getStatusCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testDeleteEntryExpectBadRequest()
|
||||||
|
{
|
||||||
|
$this->client->request('DELETE', '/api/entries/1.json?expect=badrequest');
|
||||||
|
|
||||||
|
$this->assertSame(400, $this->client->getResponse()->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testPostEntry()
|
public function testPostEntry()
|
||||||
|
|
Loading…
Reference in a new issue