Skip to content

Commit

Permalink
test: added validation test case, unable to reproduce #524 (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm committed Sep 24, 2023
1 parent 4801bed commit 3b6258d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions request_test.go
Expand Up @@ -47,6 +47,25 @@ func TestGet(t *testing.T) {
logResponse(t, resp)
}

func TestGetGH524(t *testing.T) {
ts := createGetServer(t)
defer ts.Close()

resp, err := dc().R().
SetPathParams((map[string]string{
"userId": "sample@sample.com",
"subAccountId": "100002",
"path": "groups/developers",
})).
SetQueryParam("request_no", strconv.FormatInt(time.Now().Unix(), 10)).
SetDebug(true).
Get(ts.URL + "/v1/users/{userId}/{subAccountId}/{path}/details")

assertError(t, err)
assertEqual(t, http.StatusOK, resp.StatusCode())
assertEqual(t, resp.Request.Header.Get("Content-Type"), "") // unable to reproduce reported issue
}

func TestIllegalRetryCount(t *testing.T) {
ts := createGetServer(t)
defer ts.Close()
Expand Down

0 comments on commit 3b6258d

Please sign in to comment.