diff options
Diffstat (limited to 'tests')
-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'); |