Skip to content

Add badge profile asset tests#2775

Open
cybercraftsolutionsllc wants to merge 1 commit into
stakwork:masterfrom
cybercraftsolutionsllc:codex/badges-page-backend-tests
Open

Add badge profile asset tests#2775
cybercraftsolutionsllc wants to merge 1 commit into
stakwork:masterfrom
cybercraftsolutionsllc:codex/badges-page-backend-tests

Conversation

@cybercraftsolutionsllc
Copy link
Copy Markdown

Summary

  • Adds badge profile coverage for /person/uuid/{uuid} so profile lookups return badge asset IDs for the owner, another signed-in viewer, and an anonymous viewer.
  • Adds /person/assets/{uuid} coverage for badge asset metadata, including the image/icon URL the badges tab needs to render.
  • Gives people_test.go its own DB setup helper so these tests can be validated without importing unrelated handler tests.

Fixes #876

Validation

  • git diff --check
  • go test handlers\\people.go handlers\\github.go handlers\\people_test.go -run "^$"

Blocked locally:

  • go test ./handlers -run "TestGetPersonByUuidIncludesBadgeIdsForProfileContexts|TestGetPersonAssetsByUuidReturnsBadgeAssetImages" is blocked by the repo's existing generated mocks.Database drift (GetBountyByUnlockCode missing).
  • Running the new tests directly needs the repo Postgres test DB at localhost:5532; Docker is installed locally but the daemon is not running, so I could not start docker/testdb-docker-compose.yml here.

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.

Implement unit tests for badges page

2 participants