Skip to content

Commit

Permalink
Tiny changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Gulitskiy committed Feb 15, 2014
1 parent c4b118c commit 0d04321
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Zizaco/Confide/ConfideUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ public function forgotPassword()
public function resetPassword( $params )
{
$password = array_get($params, 'password', '');
$passwordConfirmation = array_get($params, 'password_confirmation', '');

$passwordValidators = array(
'password' => static::$rules['password'],
Expand Down
4 changes: 3 additions & 1 deletion tests/ConfideUserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public function testShouldChangePassword()
->andReturn( true )
->once();

// Should call validate method
ConfideUser::$app['confide.repository']->shouldReceive('validate')
->andReturn( true )
->once();
Expand All @@ -125,11 +126,12 @@ public function testShouldNotChangePassword()
'password_confirmation'=>''
);

// Should call changePassword of the repository
// Should not call changePassword of the repository
ConfideUser::$app['confide.repository'] = m::mock( 'ConfideRepository' );
ConfideUser::$app['confide.repository']->shouldReceive( 'changePassword' )
->never();

// Should call validate method
ConfideUser::$app['confide.repository']->shouldReceive('validate')
->andReturn( false )
->times(4);
Expand Down

0 comments on commit 0d04321

Please sign in to comment.