diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-08 19:39:50 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-08 20:25:42 +0200 |
commit | 876d77a67d1415c1be56f08e9a2d3b1d294bb61f (patch) | |
tree | 5811d482ca0baa6b9791721e518efbe4a543b92c /tests | |
parent | eed812afd0626697d33f7e9d3bfd8eca138c463d (diff) | |
download | wallabag-876d77a67d1415c1be56f08e9a2d3b1d294bb61f.tar.gz wallabag-876d77a67d1415c1be56f08e9a2d3b1d294bb61f.tar.zst wallabag-876d77a67d1415c1be56f08e9a2d3b1d294bb61f.zip |
Better display and description
Confirmation message isn’t required since it is written in the delete description
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index 7929b63d..5faa0130 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | |||
@@ -581,7 +581,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
581 | $crawler = $client->request('GET', '/config'); | 581 | $crawler = $client->request('GET', '/config'); |
582 | 582 | ||
583 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 583 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
584 | $this->assertContains('config.form_user.delete_account', $body[0]); | 584 | $this->assertContains('config.form_user.delete.button', $body[0]); |
585 | 585 | ||
586 | $em = $client->getContainer()->get('doctrine.orm.entity_manager'); | 586 | $em = $client->getContainer()->get('doctrine.orm.entity_manager'); |
587 | 587 | ||
@@ -602,7 +602,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
602 | $crawler = $client->request('GET', '/config'); | 602 | $crawler = $client->request('GET', '/config'); |
603 | 603 | ||
604 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); | 604 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text'])); |
605 | $this->assertNotContains('config.form_user.delete_account', $body[0]); | 605 | $this->assertNotContains('config.form_user.delete.button', $body[0]); |
606 | 606 | ||
607 | $client->request('GET', '/account/delete'); | 607 | $client->request('GET', '/account/delete'); |
608 | $this->assertEquals(403, $client->getResponse()->getStatusCode()); | 608 | $this->assertEquals(403, $client->getResponse()->getStatusCode()); |
@@ -649,6 +649,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
649 | $em->flush(); | 649 | $em->flush(); |
650 | 650 | ||
651 | $this->logInAs('wallace'); | 651 | $this->logInAs('wallace'); |
652 | $loggedInUserId = $this->getLoggedInUserId(); | ||
652 | 653 | ||
653 | // create entry to check after user deletion | 654 | // create entry to check after user deletion |
654 | // that this entry is also deleted | 655 | // that this entry is also deleted |
@@ -685,7 +686,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
685 | $entries = $client->getContainer() | 686 | $entries = $client->getContainer() |
686 | ->get('doctrine.orm.entity_manager') | 687 | ->get('doctrine.orm.entity_manager') |
687 | ->getRepository('WallabagCoreBundle:Entry') | 688 | ->getRepository('WallabagCoreBundle:Entry') |
688 | ->findByUser($this->getLoggedInUserId()); | 689 | ->findByUser($loggedInUserId); |
689 | 690 | ||
690 | $this->assertEmpty($entries); | 691 | $this->assertEmpty($entries); |
691 | } | 692 | } |