test: add integration tests for POST /issues/{owner}/{repo}/{index}/assignees AssignIssue handler #135
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 AssignIssue handler (POST /issues/{owner}/{repo}/{index}/assignees) has no integration test coverage. This handler assigns a collaborator to an issue via the Gitea API.
What to Do
Add test cases to
internal/handlers/handlers_test.go:TestAssignIssue_Success- POST with valid assignee; assert HTTP 200 and HTMX fragment swapTestAssignIssue_EmptyAssignee- POST with empty assignee field; assert HTTP 400TestAssignIssue_InvalidIndex- non-numeric issue index; assert HTTP 400TestAssignIssue_NoToken- no auth; assert redirect or 401Files to Modify
internal/handlers/handlers_test.go- add test casesAcceptance Criteria
go test ./internal/handlers/...Roadmap Reference
Phase 1.5 - HTTP Handlers (action: Assign on issue detail).
Triaged by repo manager. Assigned to @AI-QA (integration test work, small complexity). Ready for development.
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.