Skip to content

Add unit tests for game endpoints - #15

Merged
pavog merged 1 commit into
masterfrom
add-game-tests
Oct 16, 2026
Merged

pavog merged 1 commit into
masterfrom
add-game-tests

Conversation

@pavog

@pavog pavog commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

This PR adds unit tests for the game endpoints of CurseForgeAPIClient. They run against the mocked HTTP client from ClientTestCase.

  • getGames(): default pagination (index=0, pageSize=50), a custom offset and page size, and mapping the results to Game
  • getGame()
  • getGameVersionTypes()
  • getGameVersions(): the request goes to /v2/games/{gameId}/versions
  • getGameVersionsByType(): filters the v2 response by type

The fixtures in tests/Unit/Client/Fixtures are recorded responses from the real CurseForge API.

@pavog
pavog merged commit fc9dce1 into master Oct 16, 2026
5 checks passed
@pavog
pavog deleted the add-game-tests branch October 16, 2026 09:33
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.

2 participants