Skip to content

LG-10064 refactor password reset profile factory and associated specs#8561

Merged
kbighorse merged 15 commits intomainfrom
LG-9987-specify-active-on-password-reset-profile-factory
Jun 13, 2023
Merged

LG-10064 refactor password reset profile factory and associated specs#8561
kbighorse merged 15 commits intomainfrom
LG-9987-specify-active-on-password-reset-profile-factory

Conversation

@kbighorse
Copy link
Contributor

@kbighorse kbighorse commented Jun 8, 2023

🎫 Ticket

password_reset Profile factory should only define password_reset, and also accommodate verified and not-verified variations
Also related to:
IDP must have a characterization test for profile states

🛠 Summary of changes

Previously, the password_reset trait represented password reset profiles which were designed to only be possible for verified profiles. This change makes it possible to also represent password reset profiles that are not yet verified, or any other password reset profile.

📜 Testing Plan

  • pass all tests

Copy link
Contributor

@theabrad theabrad left a comment

Choose a reason for hiding this comment

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

LGTM. This is a better way of splitting out the two states


trait :verified do
verified_at { Time.zone.now }
activated_at { Time.zone.now }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

verified profiles have been activated (not necessarily active though)

trait :password_reset do
activated_at { Time.zone.now }
verified_at { Time.zone.now }
active { false }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

password reset profiles are always not active

@@ -675,10 +676,10 @@
end

context 'the user has no active profile but has a previously verified profile' do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this test only needed a verified profile, not necessarily a password reset profile

@kbighorse kbighorse changed the title Lg 9987 specify active on password reset profile factory Lg 100064 refactor password reset profile factory and associated specs Jun 13, 2023
@kbighorse kbighorse merged commit 45f56fe into main Jun 13, 2023
@kbighorse kbighorse deleted the LG-9987-specify-active-on-password-reset-profile-factory branch June 13, 2023 18:32
@kbighorse kbighorse changed the title Lg 100064 refactor password reset profile factory and associated specs LG-10064 refactor password reset profile factory and associated specs Jul 7, 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.

3 participants