mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-16 18:01:38 +00:00
Add ability to revoke feed token
This commit is contained in:
parent
7e5b7e029a
commit
c4bf12aade
18 changed files with 85 additions and 13 deletions
|
@ -330,7 +330,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
|||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertNotContains('config.form_feed.no_token', $body[0]);
|
||||
$this->assertContains('config.form_feed.token_reset', $body[0]);
|
||||
}
|
||||
|
||||
public function testGenerateTokenAjax()
|
||||
|
@ -351,6 +351,22 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
|||
$this->assertArrayHasKey('token', $content);
|
||||
}
|
||||
|
||||
public function testRevokeTokenAjax()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getClient();
|
||||
|
||||
$client->request(
|
||||
'GET',
|
||||
'/revoke-token',
|
||||
[],
|
||||
[],
|
||||
['HTTP_X-Requested-With' => 'XMLHttpRequest']
|
||||
);
|
||||
|
||||
$this->assertSame(200, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testFeedUpdate()
|
||||
{
|
||||
$this->logInAs('admin');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue