Rackspace Auto Scale: Add policies Update()
diff --git a/rackspace/autoscale/v1/policies/requests_test.go b/rackspace/autoscale/v1/policies/requests_test.go
index b600377..8ee90f3 100644
--- a/rackspace/autoscale/v1/policies/requests_test.go
+++ b/rackspace/autoscale/v1/policies/requests_test.go
@@ -108,3 +108,24 @@
th.AssertNoErr(t, err)
th.CheckDeepEquals(t, WebhookPolicy, *policy)
}
+
+func TestUpdate(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ HandlePolicyUpdateSuccessfully(t)
+
+ client := client.ServiceClient()
+ opts := UpdateOpts{
+ Name: "updated webhook policy",
+ Type: Webhook,
+ Cooldown: 600,
+ Adjustment: Adjustment{
+ Type: ChangePercent,
+ Value: 6.6,
+ },
+ }
+
+ err := Update(client, groupID, webhookPolicyID, opts).ExtractErr()
+
+ th.AssertNoErr(t, err)
+}