aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-06-05 17:55:13 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-06-05 17:55:13 +0200
commitc4bf12aadee9e1f757fd9d783b034bb57b03fb17 (patch)
tree30bd13c56866f6be1fa8aed65fd39b31b7a62ee9 /tests
parent7e5b7e029a5ba7aadc8128243afaa00e2a870645 (diff)
downloadwallabag-c4bf12aadee9e1f757fd9d783b034bb57b03fb17.tar.gz
wallabag-c4bf12aadee9e1f757fd9d783b034bb57b03fb17.tar.zst
wallabag-c4bf12aadee9e1f757fd9d783b034bb57b03fb17.zip
Add ability to revoke feed token
Diffstat (limited to 'tests')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php18
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');