Add ResetAPIKey.
diff --git a/rackspace/identity/v2/users/fixtures.go b/rackspace/identity/v2/users/fixtures.go
index e843966..973f39e 100644
--- a/rackspace/identity/v2/users/fixtures.go
+++ b/rackspace/identity/v2/users/fixtures.go
@@ -136,3 +136,19 @@
w.WriteHeader(http.StatusNoContent)
})
}
+
+func mockResetAPIKey(t *testing.T) {
+ th.Mux.HandleFunc("/users/99/OS-KSADM/credentials/RAX-KSKEY:apiKeyCredentials/RAX-AUTH/reset", func(w http.ResponseWriter, r *http.Request) {
+ th.TestMethod(t, r, "POST")
+ th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
+ w.Header().Add("Content-Type", "application/json")
+ w.WriteHeader(http.StatusOK)
+ fmt.Fprintf(w, `
+{
+ "RAX-KSKEY:apiKeyCredentials": {
+ "username": "joesmith",
+ "apiKey": "mooH1eiLahd5ahYood7r"
+ }
+}`)
+ })
+}