@@ -237,30 +237,30 @@ func TestGoogleProviderGetEmailAddressEmailMissing(t *testing.T) {
238func TestGoogleProvider_userInGroup(t *testing.T) {
238func TestGoogleProvider_userInGroup(t *testing.T) {
239 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
239 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
240− if r.URL.Path == "/groups/group@example.com/hasMember/member-in-domain@example.com" {
240+ if r.URL.Path == "/admin/directory/v1/groups/group@example.com/hasMember/member-in-domain@example.com" {
241 fmt.Fprintln(w, `{"isMember": true}`)
241 fmt.Fprintln(w, `{"isMember": true}`)
242− } else if r.URL.Path == "/groups/group@example.com/hasMember/non-member-in-domain@example.com" {
242+ } else if r.URL.Path == "/admin/directory/v1/groups/group@example.com/hasMember/non-member-in-domain@example.com" {
243 fmt.Fprintln(w, `{"isMember": false}`)
243 fmt.Fprintln(w, `{"isMember": false}`)
244− } else if r.URL.Path == "/groups/group@example.com/hasMember/member-out-of-domain@otherexample.com" {
244+ } else if r.URL.Path == "/admin/directory/v1/groups/group@example.com/hasMember/member-out-of-domain@otherexample.com" {
245 http.Error(
245 http.Error(
247 `{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Input: memberKey"}],"code": 400,"message": "Invalid Input: memberKey"}}`,
247 `{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Input: memberKey"}],"code": 400,"message": "Invalid Input: memberKey"}}`,
248 http.StatusBadRequest,
248 http.StatusBadRequest,
250− } else if r.URL.Path == "/groups/group@example.com/hasMember/non-member-out-of-domain@otherexample.com" {
250+ } else if r.URL.Path == "/admin/directory/v1/groups/group@example.com/hasMember/non-member-out-of-domain@otherexample.com" {
251 http.Error(
251 http.Error(
253 `{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Input: memberKey"}],"code": 400,"message": "Invalid Input: memberKey"}}`,
253 `{"error": {"errors": [{"domain": "global","reason": "invalid","message": "Invalid Input: memberKey"}],"code": 400,"message": "Invalid Input: memberKey"}}`,
254 http.StatusBadRequest,
254 http.StatusBadRequest,
256− } else if r.URL.Path == "/groups/group@example.com/members/non-member-out-of-domain@otherexample.com" {
256+ } else if r.URL.Path == "/admin/directory/v1/groups/group@example.com/members/non-member-out-of-domain@otherexample.com" {
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
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 http.Error(
258 http.Error(
260 `{"error": {"errors": [{"domain": "global","reason": "notFound","message": "Resource Not Found: memberKey"}],"code": 404,"message": "Resource Not Found: memberKey"}}`,
260 `{"error": {"errors": [{"domain": "global","reason": "notFound","message": "Resource Not Found: memberKey"}],"code": 404,"message": "Resource Not Found: memberKey"}}`,
261 http.StatusNotFound,
261 http.StatusNotFound,
263− } else if r.URL.Path == "/groups/group@example.com/members/member-out-of-domain@otherexample.com" {
263+ } else if r.URL.Path == "/admin/directory/v1/groups/group@example.com/members/member-out-of-domain@otherexample.com" {
264 fmt.Fprintln(w,
264 fmt.Fprintln(w,
265 `{"kind": "admin#directory#member","etag":"12345","id":"1234567890","email": "member-out-of-domain@otherexample.com","role": "MEMBER","type": "USER","status": "ACTIVE","delivery_settings": "ALL_MAIL"}}`,
265 `{"kind": "admin#directory#member","etag":"12345","id":"1234567890","email": "member-out-of-domain@otherexample.com","role": "MEMBER","type": "USER","status": "ACTIVE","delivery_settings": "ALL_MAIL"}}`,