Rackspace Auto Scale: Add policies Get()
diff --git a/rackspace/autoscale/v1/policies/requests_test.go b/rackspace/autoscale/v1/policies/requests_test.go
index bf49816..b600377 100644
--- a/rackspace/autoscale/v1/policies/requests_test.go
+++ b/rackspace/autoscale/v1/policies/requests_test.go
@@ -9,7 +9,8 @@
)
const (
- groupID = "10eb3219-1b12-4b34-b1e4-e10ee4f24c65"
+ groupID = "60b15dad-5ea1-43fa-9a12-a1d737b4da07"
+ webhookPolicyID = "2b48d247-0282-4b9d-8775-5c4b67e8e649"
)
func TestList(t *testing.T) {
@@ -18,7 +19,7 @@
HandlePolicyListSuccessfully(t)
pages := 0
- pager := List(client.ServiceClient(), "10eb3219-1b12-4b34-b1e4-e10ee4f24c65")
+ pager := List(client.ServiceClient(), "60b15dad-5ea1-43fa-9a12-a1d737b4da07")
err := pager.EachPage(func(page pagination.Page) (bool, error) {
pages++
@@ -94,3 +95,16 @@
th.CheckDeepEquals(t, OneTimePolicy, policies[1])
th.CheckDeepEquals(t, SundayAfternoonPolicy, policies[2])
}
+
+func TestGet(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ HandlePolicyGetSuccessfully(t)
+
+ client := client.ServiceClient()
+
+ policy, err := Get(client, groupID, webhookPolicyID).Extract()
+
+ th.AssertNoErr(t, err)
+ th.CheckDeepEquals(t, WebhookPolicy, *policy)
+}