Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VI-471] adds MHV::AccountCreator Sidekiq job #18527

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

bramleyjl
Copy link
Contributor

@bramleyjl bramleyjl commented Sep 19, 2024

Summary

Related issue(s)

  • VI-471

Testing done

  • New code is covered by unit tests
  • This is difficult to test without being on staging but the validations and object creation with a dummy response can be tested.
     def mhv_account_creation_response
       {
         user_profile_id: '12345678',
         premium: true,
         champ_va: true,
         patient: true,
         sm_account_created: true,
         message: 'some message'
       }
     end
  • in rails console test the Sidekiq job by passing a user_verification.id you have locally
    • a user_verification.user_account.terms_of_use_agreements needs to exist & be accepted
      > mhv_account = MHV::AccountCreatorJob.new.perform(5)
         => #<MHVUserAccount:0x00007213e4c3f950 @attributes=...>
      > mhv_account.attributes
         => {"user_profile_id"=>"12345678", "premium"=>true, "champ_va"=>true, "patient"=>true, "sm_account_created"=>true, "message"=>"some message"
      
    • test the error response with a bad user_verification id
      > mhv_account = MHV::AccountCreatorJob.new.perform(55555)
      Rails -- MHV AccountCreatorJob failed: UserVerification not found for id 55555
      

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution

ryan-mcneil
ryan-mcneil previously approved these changes Sep 23, 2024
Copy link

Backend-review-group approval confirmed.

@ryan-mcneil ryan-mcneil dismissed their stale review September 23, 2024 16:29

Missed the failing checks - sorry! I'll keep an eye on it

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

Successfully merging this pull request may close these issues.

3 participants