Various fixes to URL paths
diff --git a/rackspace/identity/v2/roles/delegate.go b/rackspace/identity/v2/roles/delegate.go
index 7ce7bc1..a6c01e4 100644
--- a/rackspace/identity/v2/roles/delegate.go
+++ b/rackspace/identity/v2/roles/delegate.go
@@ -22,7 +22,7 @@
_, result.Err = perigee.Request("PUT", userRoleURL(client, userID, roleID), perigee.Options{
MoreHeaders: client.AuthenticatedHeaders(),
- OkCodes: []int{201},
+ OkCodes: []int{200, 201},
})
return result
@@ -49,5 +49,5 @@
}
func userRoleURL(c *gophercloud.ServiceClient, userID, roleID string) string {
- return c.ServiceURL(os.UserPath, userID, os.ExtPath, roleID)
+ return c.ServiceURL(os.UserPath, userID, os.RolePath, os.ExtPath, roleID)
}
diff --git a/rackspace/identity/v2/roles/fixtures.go b/rackspace/identity/v2/roles/fixtures.go
index cbfbf58..de847c5 100644
--- a/rackspace/identity/v2/roles/fixtures.go
+++ b/rackspace/identity/v2/roles/fixtures.go
@@ -10,7 +10,7 @@
)
func MockListRoleResponse(t *testing.T) {
- th.Mux.HandleFunc("/OS-KSADMN/roles", func(w http.ResponseWriter, r *http.Request) {
+ th.Mux.HandleFunc("/OS-KSADM/roles", func(w http.ResponseWriter, r *http.Request) {
th.TestMethod(t, r, "GET")
th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)