Update the Rackspace Cloud Files tests too.
diff --git a/rackspace/objectstorage/v1/objects/delegate_test.go b/rackspace/objectstorage/v1/objects/delegate_test.go
index 08831ec..a336991 100644
--- a/rackspace/objectstorage/v1/objects/delegate_test.go
+++ b/rackspace/objectstorage/v1/objects/delegate_test.go
@@ -66,14 +66,24 @@
func TestCreateObject(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
- os.HandleCreateObjectSuccessfully(t)
+ os.HandleCreateTextObjectSuccessfully(t)
content := bytes.NewBufferString("Did gyre and gimble in the wabe")
- options := &os.CreateOpts{ContentType: "application/json"}
+ options := &os.CreateOpts{ContentType: "text/plain"}
res := Create(fake.ServiceClient(), "testContainer", "testObject", content, options)
th.AssertNoErr(t, res.Err)
}
+func TestCreateObjectWithoutContentType(t *testing.T) {
+ th.SetupHTTP()
+ defer th.TeardownHTTP()
+ os.HandleCreateTypelessObjectSuccessfully(t)
+
+ content := bytes.NewBufferString("The sky was the color of television, tuned to a dead channel.")
+ res := Create(fake.ServiceClient(), "testContainer", "testObject", content, &CreateOpts{})
+ th.AssertNoErr(t, res.Err)
+}
+
func TestCopyObject(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()