Skip to content

Add unit tests for cursor encoding and decoding helper used in paginated endpoints #614

Description

@Chucks1093

Summary

The cursor encoding helper (base64 encode/decode of pagination metadata) is used across all paginated endpoints but has no unit tests. Tests should confirm round-trip correctness and safe handling of edge cases like empty cursors and malformed input.

Scope

  • Test encode followed by decode returns the original value for a standard cursor object
  • Test decoding an empty string returns null without throwing
  • Test decoding a non-base64 string returns null without throwing
  • Test cursor object with special characters (spaces, slashes) survives the round trip

Acceptance Criteria

  • Encode → decode round trip is lossless
  • Empty string decodes to null
  • Invalid base64 decodes to null without error
  • Special characters in cursor values survive round trip

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions