test(backend): refactor token transfer failure tests with helper functions - #167
Merged
Merged
Conversation
…tions - Extract token generation logic into `generate_user_token()` helper function - Extract user setup with KYC approval into `setup_user_with_kyc()` helper function - Extract plan request body creation into `plan_request_body()` helper function - Extract HTTP request building into `build_create_plan_request()` helper function - Rename test from `plan_creation_rolls_back_on_transfer_revert()` to `revert_rolls_back_plan_insert()` for clarity - Add comprehensive test coverage for rollback scenarios: audit logs, notifications, and plan logs - Improve code organization with section comments (Helpers, Tests) - Enhance SQL query formatting for readability - Reduce test duplication by centralizing common setup and request building logic
Contributor
|
@martinvibes Make your implementation to pass CI checks |
Contributor
|
@martinvibes Pls resolve conflict |
ONEONUORA
approved these changes
Feb 24, 2026
ONEONUORA
left a comment
Contributor
There was a problem hiding this comment.
Nice implementation @martinvibes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
generate_user_token()helper functionsetup_user_with_kyc()helper functionplan_request_body()helper functionbuild_create_plan_request()helper functionplan_creation_rolls_back_on_transfer_revert()torevert_rolls_back_plan_insert()for claritycloses #108