Don't allow autoscale webhook updates with no metadata
diff --git a/rackspace/autoscale/v1/webhooks/requests_test.go b/rackspace/autoscale/v1/webhooks/requests_test.go
index 925c29e..950c90d 100644
--- a/rackspace/autoscale/v1/webhooks/requests_test.go
+++ b/rackspace/autoscale/v1/webhooks/requests_test.go
@@ -105,6 +105,21 @@
th.AssertNoErr(t, err)
}
+func TestUpdateNoMetadata(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ HandleWebhookUpdateSuccessfully(t)
+
+ client := client.ServiceClient()
+ opts := UpdateOpts{
+ Name: "updated hook",
+ }
+
+ err := Update(client, groupID, policyID, firstID, opts).ExtractErr()
+
+ th.AssertEquals(t, ErrNoMetadata, err)
+}
+
func TestDelete(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()