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,14 +79,9 @@ class UserController extends BaseController
|
|||||||
|
|
||||||
//$user = $this->user->register(Input::all());
|
//$user = $this->user->register(Input::all());
|
||||||
if ($user) {
|
if ($user) {
|
||||||
if (Config::get('auth.verify_mail') === true) {
|
$email->sendVerificationMail($user);
|
||||||
$email->sendVerificationMail($user);
|
|
||||||
|
|
||||||
return View::make('user.verification-pending');
|
return View::make('user.verification-pending');
|
||||||
}
|
|
||||||
$email->sendPasswordMail($user);
|
|
||||||
|
|
||||||
return View::make('user.registered');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -115,14 +110,9 @@ class UserController extends BaseController
|
|||||||
|
|
||||||
return View::make('user.remindme');
|
return View::make('user.remindme');
|
||||||
}
|
}
|
||||||
if (Config::get('auth.verify_reset') === true) {
|
$email->sendResetVerification($user);
|
||||||
$email->sendResetVerification($user);
|
|
||||||
|
|
||||||
return View::make('user.verification-pending');
|
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->wantTo('post-register a new account');
|
||||||
$I->amOnPage('/register');
|
$I->amOnPage('/register');
|
||||||
$I->submitForm('#register', ['email' => 'noreply@gmail.com']);
|
$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']);
|
$I->seeRecord('users', ['email' => 'noreply@gmail.com']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user