Skip to content

[TESTING] Write Unit Tests for Invoice Token Allowance Expirations (#141) - #266

Open
nekwasar wants to merge 1 commit into
StellarState:devfrom
nekwasar:feature/token-allowance-tests-141
Open

[TESTING] Write Unit Tests for Invoice Token Allowance Expirations (#141)#266
nekwasar wants to merge 1 commit into
StellarState:devfrom
nekwasar:feature/token-allowance-tests-141

Conversation

@nekwasar

Copy link
Copy Markdown

Closes #141

Tests added (6)

Allowance expiration edge cases

  • test_allowance_expired_on_transfer_from_locked — AllowanceExpired takes priority over TransferLocked
  • test_expired_allowance_checked_before_balance — expiration checked before balance (no InsufficientBalance false positive)
  • test_burn_from_with_expired_allowance_after_partial_use — partial allowance use, then expiry

Paused state + allowance interactions

  • test_paused_rejects_transfer_from_and_burn_from — paused blocks allowance-based operations
  • test_paused_rejects_transfer_and_burn — paused blocks direct transfers/burns
  • test_approve_survives_pause_unpause_cycle — allowance preserved through pause/unpause

All tests assert proper error code emissions and state storage persistence.

…llarState#141)

- test_allowance_expired_on_transfer_from_locked — AllowanceExpired takes priority over TransferLocked
- test_expired_allowance_checked_before_balance — expiration check before balance check
- test_paused_rejects_transfer_from_and_burn_from — paused state rejects allowance-based ops
- test_paused_rejects_transfer_and_burn — paused state rejects direct ops
- test_approve_survives_pause_unpause_cycle — allowance preserved across pause/unpause
- test_burn_from_with_expired_allowance_after_partial_use — partial use then expiration
@chizzy192

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

@chizzy192 chizzy192 closed this Jul 29, 2026
@chizzy192 chizzy192 reopened this Jul 29, 2026
@chizzy192 chizzy192 closed this Jul 30, 2026
@chizzy192 chizzy192 reopened this Jul 30, 2026
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@nekwasar Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[TESTING] Write Unit Tests for Invoice Token Allowance Expirations

2 participants