@@ -237,30 +237,30 @@ func TestGoogleProviderGetEmailAddressEmailMissing(t *testing.T) {
237
237
238
238
func TestGoogleProvider_userInGroup (t * testing.T ) {
239
239
ts := httptest .NewServer (http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
240
- if r .
URL .
Path == "/groups/[email protected] /hasMember/[email protected] " {
240
+ if r .
URL .
Path == "/admin/directory/v1/ groups/[email protected] /hasMember/[email protected] " {
241
241
fmt .Fprintln (w , `{"isMember": true}` )
242
- }
else if r .
URL .
Path == "/groups/[email protected] /hasMember/[email protected] " {
242
+ }
else if r .
URL .
Path == "/admin/directory/v1/ groups/[email protected] /hasMember/[email protected] " {
243
243
fmt .Fprintln (w , `{"isMember": false}` )
244
- }
else if r .
URL .
Path == "/groups/[email protected] /hasMember/[email protected] " {
244
+ }
else if r .
URL .
Path == "/admin/directory/v1/ groups/[email protected] /hasMember/[email protected] " {
245
245
http .Error (
246
246
w ,
247
247
`{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Input: memberKey"}],"code": 400,"message": "Invalid Input: memberKey"}}` ,
248
248
http .StatusBadRequest ,
249
249
)
250
- }
else if r .
URL .
Path == "/groups/[email protected] /hasMember/[email protected] " {
250
+ }
else if r .
URL .
Path == "/admin/directory/v1/ groups/[email protected] /hasMember/[email protected] " {
251
251
http .Error (
252
252
w ,
253
253
`{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Input: memberKey"}],"code": 400,"message": "Invalid Input: memberKey"}}` ,
254
254
http .StatusBadRequest ,
255
255
)
256
- }
else if r .
URL .
Path == "/groups/[email protected] /members/[email protected] " {
256
+ }
else if r .
URL .
Path == "/admin/directory/v1/ groups/[email protected] /members/[email protected] " {
257
257
// note that the client currently doesn't care what this response text or code is - any error here results in failure to match the group
258
258
http .Error (
259
259
w ,
260
260
`{"error": {"errors": [{"domain": "global","reason": "notFound","message": "Resource Not Found: memberKey"}],"code": 404,"message": "Resource Not Found: memberKey"}}` ,
261
261
http .StatusNotFound ,
262
262
)
263
- }
else if r .
URL .
Path == "/groups/[email protected] /members/[email protected] " {
263
+ }
else if r .
URL .
Path == "/admin/directory/v1/ groups/[email protected] /members/[email protected] " {
264
264
fmt .Fprintln (w ,
265
265
`{"kind": "admin#directory#member","etag":"12345","id":"1234567890","email": "[email protected] ","role": "MEMBER","type": "USER","status": "ACTIVE","delivery_settings": "ALL_MAIL"}}` ,
266
266
)
0 commit comments