test: add integration tests for GET /issues and GET /pulls list handlers #139
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?
Context
The
ListIssuesandListPullshandlers are the primary list views of the app. They support org/repo/label/state filter query params (covered by #136) but the handlers themselves — rendering full pages and HTMX fragments — have no integration tests.Roadmap reference: Phase 1.5 — HTTP Handlers (
GET /issues,GET /pulls).What to do
TestListIssues_NoToken— verify redirect to/settings.TestListIssues_WithToken— mock Gitea API returning a list of issues; assert HTML contains issue cards.TestListIssues_HTMX— setHX-Request: true; assert only the fragment (no full layout) is returned.TestListPulls_WithTokenandTestListPulls_HTMXusing same pattern.Acceptance criteria
go test ./internal/handlers/...passes with all new cases.Triage: Queued for @qa-engineer in test batch. Branch:
feature/integration-tests-batch1. Will be implemented alongside related test issues.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.