Rackspace Auto Scale: Add webhooks Update()
diff --git a/rackspace/autoscale/v1/webhooks/requests_test.go b/rackspace/autoscale/v1/webhooks/requests_test.go
index 5a46a63..e06080a 100644
--- a/rackspace/autoscale/v1/webhooks/requests_test.go
+++ b/rackspace/autoscale/v1/webhooks/requests_test.go
@@ -86,3 +86,21 @@
th.AssertNoErr(t, err)
th.CheckDeepEquals(t, FirstWebhook, *webhook)
}
+
+func TestUpdate(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ HandleWebhookUpdateSuccessfully(t)
+
+ client := client.ServiceClient()
+ opts := UpdateOpts{
+ Name: "updated hook",
+ Metadata: map[string]string{
+ "new-key": "some data",
+ },
+ }
+
+ err := Update(client, groupID, policyID, firstID, opts).ExtractErr()
+
+ th.AssertNoErr(t, err)
+}