mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-04 19:50:55 +00:00
Full coverage for user controller.
This commit is contained in:
@@ -79,15 +79,10 @@ class UserController extends BaseController
|
||||
|
||||
//$user = $this->user->register(Input::all());
|
||||
if ($user) {
|
||||
if (Config::get('auth.verify_mail') === true) {
|
||||
$email->sendVerificationMail($user);
|
||||
|
||||
return View::make('user.verification-pending');
|
||||
}
|
||||
$email->sendPasswordMail($user);
|
||||
|
||||
return View::make('user.registered');
|
||||
}
|
||||
|
||||
|
||||
return View::make('user.register');
|
||||
@@ -115,14 +110,9 @@ class UserController extends BaseController
|
||||
|
||||
return View::make('user.remindme');
|
||||
}
|
||||
if (Config::get('auth.verify_reset') === true) {
|
||||
$email->sendResetVerification($user);
|
||||
|
||||
return View::make('user.verification-pending');
|
||||
}
|
||||
$email->sendPasswordMail($user);
|
||||
|
||||
return View::make('user.registered');
|
||||
|
||||
}
|
||||
|
||||
|
@@ -68,7 +68,7 @@ class UserControllerCest
|
||||
$I->wantTo('post-register a new account');
|
||||
$I->amOnPage('/register');
|
||||
$I->submitForm('#register', ['email' => 'noreply@gmail.com']);
|
||||
$I->see('Password sent!');
|
||||
$I->see('You\'re about to get an e-mail. Please follow its instructions.');
|
||||
$I->seeRecord('users', ['email' => 'noreply@gmail.com']);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user