@@ -108,7 +108,7 @@ func TestExchangeRequest(t *testing.T) {
108
108
if err != nil {
109
109
t .Errorf ("Failed reading request body: %s." , err )
110
110
}
111
- if string (body ) != "code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
111
+ if string (body ) != "client_id=CLIENT_ID& code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
112
112
t .Errorf ("Unexpected exchange payload; got %q" , body )
113
113
}
114
114
w .Header ().Set ("Content-Type" , "application/x-www-form-urlencoded" )
@@ -152,7 +152,7 @@ func TestExchangeRequest_CustomParam(t *testing.T) {
152
152
if err != nil {
153
153
t .Errorf ("Failed reading request body: %s." , err )
154
154
}
155
- if string (body ) != "code=exchange-code&foo=bar&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
155
+ if string (body ) != "client_id=CLIENT_ID& code=exchange-code&foo=bar&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
156
156
t .Errorf ("Unexpected exchange payload, %v is found." , string (body ))
157
157
}
158
158
w .Header ().Set ("Content-Type" , "application/x-www-form-urlencoded" )
@@ -198,7 +198,7 @@ func TestExchangeRequest_JSONResponse(t *testing.T) {
198
198
if err != nil {
199
199
t .Errorf ("Failed reading request body: %s." , err )
200
200
}
201
- if string (body ) != "code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
201
+ if string (body ) != "client_id=CLIENT_ID& code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
202
202
t .Errorf ("Unexpected exchange payload, %v is found." , string (body ))
203
203
}
204
204
w .Header ().Set ("Content-Type" , "application/json" )
@@ -436,7 +436,7 @@ func TestTokenRefreshRequest(t *testing.T) {
436
436
t .Errorf ("Unexpected Content-Type header %q" , headerContentType )
437
437
}
438
438
body , _ := ioutil .ReadAll (r .Body )
439
- if string (body ) != "grant_type=refresh_token&refresh_token=REFRESH_TOKEN" {
439
+ if string (body ) != "client_id=CLIENT_ID& grant_type=refresh_token&refresh_token=REFRESH_TOKEN" {
440
440
t .Errorf ("Unexpected refresh token payload %q" , body )
441
441
}
442
442
w .Header ().Set ("Content-Type" , "application/json" )
0 commit comments