Skip to content

Add missing spec assertion for password change user event#9781

Merged
aduth merged 1 commit intomainfrom
aduth-password-change-spec-assertion
Dec 18, 2023
Merged

Add missing spec assertion for password change user event#9781
aduth merged 1 commit intomainfrom
aduth-password-change-spec-assertion

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Dec 18, 2023

🛠 Summary of changes

Adds an assertion to a test case intended to verify that a user event is created upon successful password change.

Previously, this spec would only do the set up to invoke the password change, but didn't include any assertions.

This was noticed in putting together #9780 and looking for examples of other user event spec verifications.

📜 Testing Plan

rspec spec/controllers/users/passwords_controller_spec.rb

changelog: Internal, Automated Testing, Add missing spec assertion for password change user event
patch :update, params: { update_user_password_form: params }
params = {
password: 'salty new password',
password_confirmation: 'salty new password',
Copy link
Contributor Author

@aduth aduth Dec 18, 2023

Choose a reason for hiding this comment

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

The addition of password_confirmation here is due to some code drift where we added the requirement to enter the new password twice in #8220. Since we weren't verifying anything in this spec previous, this test never began failing when adding that requirement.

@aduth aduth requested a review from a team December 18, 2023 14:03
@aduth aduth merged commit e13d3d5 into main Dec 18, 2023
@aduth aduth deleted the aduth-password-change-spec-assertion branch December 18, 2023 14:17
@jmdembe jmdembe mentioned this pull request Dec 19, 2023
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.

2 participants