Skip to content

Conversation

@Jagadeeshftw
Copy link
Contributor

Summary

Adds 12 tests for event archiving and historical query behaviour to meet #272 and improve coverage.

New tests

  • Archive marking: cancelled market archive, is_archived false for non-archived, archived entry has archived_at set.
  • Query by status: Active, Resolved, Cancelled.
  • Time range: empty range, inverted range (from > to).
  • Category: non-matching category returns empty.
  • Pagination: cursor beyond registry returns empty; limit above MAX_QUERY_LIMIT is capped to 30.
  • Result correctness: resolved entry has correct winning_outcome, state, total_staked, question, outcomes.
  • No private data: entry exposes only public fields (no votes, stakes, claimed, admin).

Testing

  • cargo test -p predictify-hybrid: 410 passed (398 existing + 12 new).

Closes #272

- Implemented tests for archiving events, querying by status (Active/Resolved/Cancelled), and filtering by time range and category.
- Added assertions to verify correct behavior of archived events and pagination limits.
- Ensured no leakage of private data in query results.
- Enhanced test coverage for event history functionality.
@Jagadeeshftw
Copy link
Contributor Author

@greatest0fallt1me review pls

@greatest0fallt1me greatest0fallt1me self-requested a review January 29, 2026 22:35
@greatest0fallt1me greatest0fallt1me merged commit 9f453bd into Predictify-org:master Jan 29, 2026
1 check passed
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.

test: add comprehensive tests for event archive and historical queries

2 participants