1
0
Fork 0
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:
Jeremy Benoist 2019-06-05 17:55:13 +02:00
parent 7e5b7e029a
commit c4bf12aade
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
18 changed files with 85 additions and 13 deletions

View file

@ -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');