Skip to content

Commit

Permalink
[FIX] test was using ServerAPIClaimUpdateResponse which is not yet pa…
Browse files Browse the repository at this point in the history
…rt of the build, changed to internal test type
  • Loading branch information
aricart authored and neilalexander committed Jun 19, 2024
1 parent 1837a3b commit 1d94d2c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions server/auth_callout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1986,9 +1986,17 @@ func updateAccount(t *testing.T, sys *nats.Conn, jwtToken string) {
r, err := sys.Request(fmt.Sprintf(`$SYS.REQ.ACCOUNT.%s.CLAIMS.UPDATE`, ac.Subject), []byte(jwtToken), time.Second*2)
require_NoError(t, err)

var updateResult ServerAPIClaimUpdateResponse
err = json.Unmarshal(r.Data, &updateResult)
type data struct {
Account string `json:"account"`
Code int `json:"code"`
}
type serverResponse struct {
Data data `json:"data"`
}

var response serverResponse
err = json.Unmarshal(r.Data, &response)
require_NoError(t, err)
require_NotNil(t, updateResult.Data)
require_Equal(t, updateResult.Data.Code, int(200))
require_NotNil(t, response.Data)
require_Equal(t, response.Data.Code, int(200))
}

0 comments on commit 1d94d2c

Please sign in to comment.