set ServiceClient field to nil before unmarshaling (#59)
diff --git a/openstack/compute/v2/servers/testing/requests_test.go b/openstack/compute/v2/servers/testing/requests_test.go
index 6d792d5..b651b92 100644
--- a/openstack/compute/v2/servers/testing/requests_test.go
+++ b/openstack/compute/v2/servers/testing/requests_test.go
@@ -89,6 +89,22 @@
th.CheckDeepEquals(t, ServerDerp, *actual)
}
+func TestCreateServerWithImageNameAndFlavorName(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ HandleServerCreationSuccessfully(t, SingleServerBody)
+
+ actual, err := servers.Create(client.ServiceClient(), servers.CreateOpts{
+ Name: "derp",
+ ImageName: "cirros-0.3.2-x86_64-disk",
+ FlavorName: "m1.tiny",
+ ServiceClient: client.ServiceClient(),
+ }).Extract()
+ th.AssertNoErr(t, err)
+
+ th.CheckDeepEquals(t, ServerDerp, *actual)
+}
+
func TestDeleteServer(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()