diff --git a/tests/Feature/app/Actions/Fortify/UpdateUserPasswordTest.php b/tests/Feature/app/Actions/Fortify/UpdateUserPasswordTest.php new file mode 100644 index 0000000..9e690c3 --- /dev/null +++ b/tests/Feature/app/Actions/Fortify/UpdateUserPasswordTest.php @@ -0,0 +1,23 @@ +user = User::factory()->create(); + $this->changer = app(UpdateUserPassword::class); + + // Log in the user + $this->actingAs($this->user); +}); + +it('updates a users password', function () { + $this->changer->update($this->user, + ['password' => 'password123', 'password_confirmation' => 'password123', 'current_password' => 'password']); + + expect(Hash::check('password123', $this->user->password))->toBeTrue(); +});