Refactor integration test DecodeJSON calls to use generic return value (#37432)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -43,8 +43,7 @@ func TestRepoLanguages(t *testing.T) {
|
||||
req = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/languages")
|
||||
resp = MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
var languages map[string]int64
|
||||
DecodeJSON(t, resp, &languages)
|
||||
languages := DecodeJSON(t, resp, map[string]int64{})
|
||||
|
||||
assert.InDeltaMapValues(t, map[string]int64{"Go": 12}, languages, 0)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user