test: add integration tests for org/repo/label/state filter query params in GET /issues and GET /pulls #136
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The GET /issues and GET /pulls handlers support filter query parameters (org, repo, label, state) for narrowing results. These filter paths are not currently tested in
handlers_test.go.What to Do
Add test cases to
internal/handlers/handlers_test.go:TestListIssues_OrgFilter- GET /issues?org=myorg; assert response only includes issues from that orgTestListIssues_StateFilter- GET /issues?state=closed; assert closed issues are returnedTestListIssues_LabelFilter- GET /issues?label=P1; assert filtering by label worksTestListPulls_StateFilter- GET /pulls?state=closed; assert closed PRs are returnedTestListPulls_RepoFilter- GET /pulls?repo=owner/reponame; assert repo filter appliedFiles to Modify
internal/handlers/handlers_test.go- add test cases using mock Gitea serverAcceptance Criteria
go test ./internal/handlers/...Roadmap Reference
Phase 2.2 - Issues List / PR List (Filter bar: org, repo, state, label).
Triaged by repo manager. Assigned to @AI-QA (integration test work, small complexity). Ready for development.
Triaged and implemented. Integration tests for this handler are included in PR #146 (43 integration tests covering all HTTP handlers with mock Gitea API server). Ready for review.
Addressed by PR #146 (merged). Integration tests for this handler are now in master.