Extract method for Accounts
diff --git a/openstack/objectstorage/v1/accounts/requests_test.go b/openstack/objectstorage/v1/accounts/requests_test.go
index d6dc26b..6454c0a 100644
--- a/openstack/objectstorage/v1/accounts/requests_test.go
+++ b/openstack/objectstorage/v1/accounts/requests_test.go
@@ -7,12 +7,10 @@
fake "github.com/rackspace/gophercloud/testhelper/client"
)
-var metadata = map[string]string{"gophercloud-test": "accounts"}
-
func TestUpdateAccount(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- HandleGetAccountSuccessfully(t)
+ HandleUpdateAccountSuccessfully(t)
options := &UpdateOpts{Metadata: map[string]string{"gophercloud-test": "accounts"}}
res := Update(fake.ServiceClient(), options)
@@ -22,12 +20,13 @@
func TestGetAccount(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- HandleUpdateAccountSuccessfully(t)
+ HandleGetAccountSuccessfully(t)
- expected := map[string]string{"Foo": "bar"}
- actual, err := Get(fake.ServiceClient(), &GetOpts{}).ExtractMetadata()
- if err != nil {
- t.Fatalf("Unable to get account metadata: %v", err)
- }
- th.CheckDeepEquals(t, expected, actual)
+ expectedMetadata := map[string]string{"Subject": "books"}
+ res := Get(fake.ServiceClient(), &GetOpts{})
+ th.AssertNoErr(t, res.Err)
+ actualMetadata, _ := res.ExtractMetadata()
+ th.CheckDeepEquals(t, expectedMetadata, actualMetadata)
+ //headers, err := res.Extract()
+ //th.AssertNoErr(t, err)
}