tests/integration: simplify code (#37249)
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> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
@@ -52,8 +52,7 @@ func TestAPIRepoTeams(t *testing.T) {
|
||||
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/teams/%s", publicOrgRepo.FullName(), "Test_Team")).
|
||||
AddTokenAuth(token)
|
||||
res = MakeRequest(t, req, http.StatusOK)
|
||||
var team *api.Team
|
||||
DecodeJSON(t, res, &team)
|
||||
team := DecodeJSON(t, res, &api.Team{})
|
||||
assert.Equal(t, teams[1], team)
|
||||
|
||||
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/teams/%s", publicOrgRepo.FullName(), "NonExistingTeam")).
|
||||
|
||||
Reference in New Issue
Block a user