Skip to content

Conversation

@hier0p
Copy link

@hier0p hier0p commented Dec 28, 2025

No description provided.

@what-the-diff
Copy link

what-the-diff bot commented Dec 28, 2025

PR Summary

  • Addition of Update User Password Test File

    • Ensures users can successfully change passwords with existing correct ones.
    • Triggers validation when incorrect current password is entered.
    • Discovers issue with confirmation password check due to rule omission.
    • Verifies that weak passwords are rejected for safety.
  • Inclusion of Update User Profile Information Test File

    • Checks for error when invalid field name is used for update, e.g., 'username' instead of 'name'.
    • Enforces both 'name' and 'email' fields for profile updates.
    • Confirms email is in correct format and uniqueness is preserved.

'current_password' => $oldPassword,
'password' => $newPassword,
'password_confirmation' => $differentPassword,
]);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is configured to match the existing code but this looks like a bug -- should I fix the bug and update the test or do I have a gap in my understanding.

expect(fn() => $action->update($user, [
'name' => fake()->name,
'email' => fake()->freeEmail,
]))->toThrow(QueryException::class);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the command is using name but the User model has username. Is it OK to update the command or am I misunderstanding how things work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant