From 0d04321afdd6250c266ffab394147feb026a9b09 Mon Sep 17 00:00:00 2001 From: Andrey Gulitskiy Date: Sun, 16 Feb 2014 03:03:20 +0700 Subject: [PATCH] Tiny changes --- src/Zizaco/Confide/ConfideUser.php | 1 - tests/ConfideUserTest.php | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Zizaco/Confide/ConfideUser.php b/src/Zizaco/Confide/ConfideUser.php index 2ddcef6..22b90f3 100644 --- a/src/Zizaco/Confide/ConfideUser.php +++ b/src/Zizaco/Confide/ConfideUser.php @@ -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'], diff --git a/tests/ConfideUserTest.php b/tests/ConfideUserTest.php index 8ad34aa..342abeb 100644 --- a/tests/ConfideUserTest.php +++ b/tests/ConfideUserTest.php @@ -105,6 +105,7 @@ public function testShouldChangePassword() ->andReturn( true ) ->once(); + // Should call validate method ConfideUser::$app['confide.repository']->shouldReceive('validate') ->andReturn( true ) ->once(); @@ -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);