@@ -101,7 +101,7 @@ func TestExchangeRequest(t *testing.T) {
101101 if err != nil {
102102 t .Errorf ("Failed reading request body: %s." , err )
103103 }
104- if string (body ) != "client_id=CLIENT_ID& code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL&scope=scope1+scope2 " {
104+ if string (body ) != "code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
105105 t .Errorf ("Unexpected exchange payload, %v is found." , string (body ))
106106 }
107107 w .Header ().Set ("Content-Type" , "application/x-www-form-urlencoded" )
@@ -145,7 +145,7 @@ func TestExchangeRequest_JSONResponse(t *testing.T) {
145145 if err != nil {
146146 t .Errorf ("Failed reading request body: %s." , err )
147147 }
148- if string (body ) != "client_id=CLIENT_ID& code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL&scope=scope1+scope2 " {
148+ if string (body ) != "code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
149149 t .Errorf ("Unexpected exchange payload, %v is found." , string (body ))
150150 }
151151 w .Header ().Set ("Content-Type" , "application/json" )
@@ -299,7 +299,7 @@ func TestPasswordCredentialsTokenRequest(t *testing.T) {
299299 if err != nil {
300300 t .Errorf ("Failed reading request body: %s." , err )
301301 }
302- expected = "client_id=CLIENT_ID& grant_type=password&password=password1&scope=scope1+scope2&username=user1"
302+ expected = "grant_type=password&password=password1&scope=scope1+scope2&username=user1"
303303 if string (body ) != expected {
304304 t .Errorf ("res.Body = %q; want %q" , string (body ), expected )
305305 }
@@ -338,7 +338,7 @@ func TestTokenRefreshRequest(t *testing.T) {
338338 t .Errorf ("Unexpected Content-Type header, %v is found." , headerContentType )
339339 }
340340 body , _ := ioutil .ReadAll (r .Body )
341- if string (body ) != "client_id=CLIENT_ID& grant_type=refresh_token&refresh_token=REFRESH_TOKEN" {
341+ if string (body ) != "grant_type=refresh_token&refresh_token=REFRESH_TOKEN" {
342342 t .Errorf ("Unexpected refresh token payload, %v is found." , string (body ))
343343 }
344344 }))
0 commit comments