By default, creating user with FOSUser are disabled by default.
Fix #1423
// handle adding new user
$newUser = new User();
+ // enable created user by default
+ $newUser->setEnabled(true);
$newUserForm = $this->createForm(new NewUserType(), $newUser, array('validation_groups' => array('Profile')));
$newUserForm->handleRequest($request);
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
$this->assertContains('User "wallace" added', $alert[0]);
+
+ $em = $client->getContainer()->get('doctrine.orm.entity_manager');
+ $user = $em
+ ->getRepository('WallabagCoreBundle:User')
+ ->findOneByUsername('wallace');
+
+ $this->assertTrue(false !== $user);
+ $this->assertTrue($user->isEnabled());
}
public function testRssUpdateResetToken()