diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2019-06-05 18:32:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-05 18:32:21 +0200 |
commit | 2b04b300f83cd4bb288c1fd00e2b77ec4f557a00 (patch) | |
tree | a877d48e7d7eb38965e959e860404e59164e9efb /tests/Wallabag | |
parent | 757ca53f6326a9b31c9f2f8508fc432e42ecf9c5 (diff) | |
parent | c4bf12aadee9e1f757fd9d783b034bb57b03fb17 (diff) | |
download | wallabag-2b04b300f83cd4bb288c1fd00e2b77ec4f557a00.tar.gz wallabag-2b04b300f83cd4bb288c1fd00e2b77ec4f557a00.tar.zst wallabag-2b04b300f83cd4bb288c1fd00e2b77ec4f557a00.zip |
Merge pull request #3994 from wallabag/feature/revoke-feed-token
Add ability to revoke feed token
Diffstat (limited to 'tests/Wallabag')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index d8478ce3..b9e0bed2 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | |||
@@ -330,7 +330,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
330 | $crawler = $client->followRedirect(); | 330 | $crawler = $client->followRedirect(); |
331 | 331 | ||
332 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 332 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
333 | $this->assertNotContains('config.form_feed.no_token', $body[0]); | 333 | $this->assertContains('config.form_feed.token_reset', $body[0]); |
334 | } | 334 | } |
335 | 335 | ||
336 | public function testGenerateTokenAjax() | 336 | public function testGenerateTokenAjax() |
@@ -351,6 +351,22 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
351 | $this->assertArrayHasKey('token', $content); | 351 | $this->assertArrayHasKey('token', $content); |
352 | } | 352 | } |
353 | 353 | ||
354 | public function testRevokeTokenAjax() | ||
355 | { | ||
356 | $this->logInAs('admin'); | ||
357 | $client = $this->getClient(); | ||
358 | |||
359 | $client->request( | ||
360 | 'GET', | ||
361 | '/revoke-token', | ||
362 | [], | ||
363 | [], | ||
364 | ['HTTP_X-Requested-With' => 'XMLHttpRequest'] | ||
365 | ); | ||
366 | |||
367 | $this->assertSame(200, $client->getResponse()->getStatusCode()); | ||
368 | } | ||
369 | |||
354 | public function testFeedUpdate() | 370 | public function testFeedUpdate() |
355 | { | 371 | { |
356 | $this->logInAs('admin'); | 372 | $this->logInAs('admin'); |