@@ -110,7 +110,7 @@ func TestExchangeRequest(t *testing.T) {
110
110
if err != nil {
111
111
t .Errorf ("Failed reading request body: %s." , err )
112
112
}
113
- if string (body ) != "code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
113
+ if string (body ) != "code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL&scope=scope1+scope2 " {
114
114
t .Errorf ("Unexpected exchange payload; got %q" , body )
115
115
}
116
116
w .Header ().Set ("Content-Type" , "application/x-www-form-urlencoded" )
@@ -154,7 +154,7 @@ func TestExchangeRequest_CustomParam(t *testing.T) {
154
154
if err != nil {
155
155
t .Errorf ("Failed reading request body: %s." , err )
156
156
}
157
- if string (body ) != "code=exchange-code&foo=bar&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
157
+ if string (body ) != "code=exchange-code&foo=bar&grant_type=authorization_code&redirect_uri=REDIRECT_URL&scope=scope1+scope2 " {
158
158
t .Errorf ("Unexpected exchange payload, %v is found." , string (body ))
159
159
}
160
160
w .Header ().Set ("Content-Type" , "application/x-www-form-urlencoded" )
@@ -200,7 +200,7 @@ func TestExchangeRequest_JSONResponse(t *testing.T) {
200
200
if err != nil {
201
201
t .Errorf ("Failed reading request body: %s." , err )
202
202
}
203
- if string (body ) != "code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL" {
203
+ if string (body ) != "code=exchange-code&grant_type=authorization_code&redirect_uri=REDIRECT_URL&scope=scope1+scope2 " {
204
204
t .Errorf ("Unexpected exchange payload, %v is found." , string (body ))
205
205
}
206
206
w .Header ().Set ("Content-Type" , "application/json" )
0 commit comments