From 755ff9e835614fd66f67615aede950b38f8ab308 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 4 Oct 2016 10:42:45 +0200 Subject: Create config even if user is disabled When a user register itself AND the wallabag instance is configured to send a confirmation email, the user is disabled when the listener (which create the config) receive the event. There were a check (don't know why) if the user is enabled we create the config. But the user is disabled when confirmation email is actived. --- .../EventListener/CreateConfigListenerTest.php | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php') diff --git a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php index 0cebd3e4..a78b77bc 100644 --- a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php +++ b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php @@ -41,26 +41,6 @@ class CreateConfigListenerTest extends \PHPUnit_Framework_TestCase $this->response = Response::create(); } - public function testWithInvalidUser() - { - $user = new User(); - $user->setEnabled(false); - - $event = new FilterUserResponseEvent( - $user, - $this->request, - $this->response - ); - - $this->em->expects($this->never())->method('persist'); - $this->em->expects($this->never())->method('flush'); - - $this->dispatcher->dispatch( - FOSUserEvents::REGISTRATION_COMPLETED, - $event - ); - } - public function testWithValidUser() { $user = new User(); -- cgit v1.2.3