mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Replace GET way to POST way to delete API client
This commit is contained in:
parent
f4fd8e4675
commit
c3d1f92278
3 changed files with 15 additions and 12 deletions
|
@ -104,20 +104,16 @@ class DeveloperControllerTest extends WallabagCoreTestCase
|
|||
$this->assertStringContainsString('no_client', $client->getResponse()->getContent());
|
||||
|
||||
$this->logInAs('bob');
|
||||
$client->request('GET', '/developer/client/delete/' . $adminApiClient->getId());
|
||||
$client->request('POST', '/developer/client/delete/' . $adminApiClient->getId());
|
||||
$this->assertSame(403, $client->getResponse()->getStatusCode());
|
||||
|
||||
// Try to remove the admin's client with the good user
|
||||
$this->logInAs('admin');
|
||||
$crawler = $client->request('GET', '/developer');
|
||||
|
||||
$link = $crawler
|
||||
->filter('div[class=collapsible-body] p a')
|
||||
->eq(0)
|
||||
->link()
|
||||
;
|
||||
$form = $crawler->filter('form[name=delete-client]')->form();
|
||||
|
||||
$client->click($link);
|
||||
$client->submit($form);
|
||||
$this->assertSame(302, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertNull(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue