Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit b333ef8

Browse files
committed
Update providers tests
1 parent 7034f0d commit b333ef8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

providers/google_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -237,30 +237,30 @@ func TestGoogleProviderGetEmailAddressEmailMissing(t *testing.T) {
237237

238238
func TestGoogleProvider_userInGroup(t *testing.T) {
239239
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]" {
241241
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]" {
243243
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]" {
245245
http.Error(
246246
w,
247247
`{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Input: memberKey"}],"code": 400,"message": "Invalid Input: memberKey"}}`,
248248
http.StatusBadRequest,
249249
)
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]" {
251251
http.Error(
252252
w,
253253
`{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Input: memberKey"}],"code": 400,"message": "Invalid Input: memberKey"}}`,
254254
http.StatusBadRequest,
255255
)
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]" {
257257
// 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
258258
http.Error(
259259
w,
260260
`{"error": {"errors": [{"domain": "global","reason": "notFound","message": "Resource Not Found: memberKey"}],"code": 404,"message": "Resource Not Found: memberKey"}}`,
261261
http.StatusNotFound,
262262
)
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]" {
264264
fmt.Fprintln(w,
265265
`{"kind": "admin#directory#member","etag":"12345","id":"1234567890","email": "[email protected]","role": "MEMBER","type": "USER","status": "ACTIVE","delivery_settings": "ALL_MAIL"}}`,
266266
)

0 commit comments

Comments
 (0)