aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
index 282bf570..75a5e308 100644
--- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
+++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php
@@ -637,6 +637,20 @@ class ConfigControllerTest extends WallabagCoreTestCase
637 $this->logInAs('wallace'); 637 $this->logInAs('wallace');
638 $client = $this->getClient(); 638 $client = $this->getClient();
639 639
640 // create entry to check after user deletion
641 // that this entry is also deleted
642 $crawler = $client->request('GET', '/new');
643
644 $this->assertEquals(200, $client->getResponse()->getStatusCode());
645
646 $form = $crawler->filter('form[name=entry]')->form();
647 $data = [
648 'entry[url]' => $url = 'https://github.com/wallabag/wallabag',
649 ];
650
651 $client->submit($form, $data);
652 $this->assertEquals(302, $client->getResponse()->getStatusCode());
653
640 $crawler = $client->request('GET', '/config'); 654 $crawler = $client->request('GET', '/config');
641 655
642 $deleteLink = $crawler->filter('.delete-account')->last()->link(); 656 $deleteLink = $crawler->filter('.delete-account')->last()->link();
@@ -654,5 +668,12 @@ class ConfigControllerTest extends WallabagCoreTestCase
654 ; 668 ;
655 669
656 $this->assertNull($user); 670 $this->assertNull($user);
671
672 $entries = $client->getContainer()
673 ->get('doctrine.orm.entity_manager')
674 ->getRepository('WallabagCoreBundle:Entry')
675 ->findByUser($this->getLoggedInUserId());
676
677 $this->assertEmpty($entries);
657 } 678 }
658} 679}