test: add integration test for changed files display in PR detail (after #189) #219
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
Issue #189 adds a changed files list to the PR detail view, including a unit test for
GetPullFiles()in the client. However, there is no integration test confirming thePullDetailhandler correctly fetches and renders changed files in the template.What to do
Add to
internal/handlers/integration_test.go:TestIntegration_PullDetail_ChangedFiles—GET /pulls/test-org/repo1/1:GetChangedFiles()in the test server to return 2 files (e.g.main.gomodified,README.mdadded)TestIntegration_PullDetail_NoChangedFiles— same endpoint butGetChangedFiles()returns empty list:Acceptance Criteria
reqWithToken+httptest.NewRecorder()patterngo test -race ./...Dependencies
References
internal/handlers/integration_test.go— existingTestIntegration_PullDetail_*patternSprint planning: Adding
blockedlabel — this issue depends on #189 (add changed files list to PR detail view). Tests can only be written once the feature is implemented.