Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit ffa06d1

Browse files
committed
Password confirmation tests and password confirmation error class
1 parent 9f63fec commit ffa06d1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

angular/app/components/register-form/register-form.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<p ng-show="vm.registerForm.password.$invalid && vm.registerForm.password.$error.minlength && vm.registerForm.password.$touched" class="help-block">Password is too short, Please enter more than 8 characters.</p>
2525
<p ng-show="vm.registerForm.password.$invalid && (vm.formSubmitted || vm.errors.password)" class="help-block">{{vm.errors.password}}</p>
2626
</div>
27-
<div class="form-group has-feedback" ng-class="{ 'has-error': vm.registerForm.password_confirmation.$invalid && ( vm.formSubmitted || vm.registerForm.password_confirmation.$touched || (vm.password !== vm.password_confirmation && vm.registerForm.password.$touched)) }">
27+
<div class="form-group has-feedback" ng-class="{ 'has-error': vm.registerForm.password_confirmation.$invalid && ( vm.formSubmitted || vm.registerForm.password_confirmation.$touched) }">
2828
<input type="password" class="form-control" placeholder="Password confirmation" ng-model="vm.password_confirmation" password-verify="vm.password" name="password_confirmation" ng-minlength="8" ng-maxlength="50" required>
2929
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
3030

tests/JwtAuthTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ public function testSuccessfulRegistration()
5252
$user = factory(App\User::class)->make();
5353

5454
$this->post('/api/auth/register', [
55-
'name' => $user->name,
56-
'email' => $user->email,
57-
'password' => 'test15125',
58-
'email_verified' => '1',
55+
'name' => $user->name,
56+
'email' => $user->email,
57+
'password' => 'test15125',
58+
'password_confirmation' => 'test15125',
59+
'email_verified' => '1',
5960
])
6061
->seeApiSuccess()
6162
->seeJsonKeyValueString('email', $user->email)

0 commit comments

Comments
 (0)