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:
@@ -40,8 +40,7 @@ func testAPICreateOAuth2Application(t *testing.T) {
|
||||
AddBasicAuth(user.Name)
|
||||
resp := MakeRequest(t, req, http.StatusCreated)
|
||||
|
||||
var createdApp *api.OAuth2Application
|
||||
DecodeJSON(t, resp, &createdApp)
|
||||
createdApp := DecodeJSON(t, resp, &api.OAuth2Application{})
|
||||
|
||||
assert.Equal(t, appBody.Name, createdApp.Name)
|
||||
assert.Len(t, createdApp.ClientSecret, 56)
|
||||
|
||||
Reference in New Issue
Block a user