Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit b9396a1

Browse files
author
Jamie Hannaford
committed
ensure rackspace tests use new fixture
1 parent 0809623 commit b9396a1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

rackspace/objectstorage/v1/objects/delegate_test.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,23 @@ func TestListObjectNames(t *testing.T) {
6666
func TestCreateObject(t *testing.T) {
6767
th.SetupHTTP()
6868
defer th.TeardownHTTP()
69-
os.HandleCreateTextObjectSuccessfully(t)
69+
70+
content := "Did gyre and gimble in the wabe"
71+
os.HandleCreateTextObjectSuccessfully(t, content)
7072

71-
content := strings.NewReader("Did gyre and gimble in the wabe")
7273
options := &os.CreateOpts{ContentType: "text/plain"}
73-
res := Create(fake.ServiceClient(), "testContainer", "testObject", content, options)
74+
res := Create(fake.ServiceClient(), "testContainer", "testObject", strings.NewReader(content), options)
7475
th.AssertNoErr(t, res.Err)
7576
}
7677

7778
func TestCreateObjectWithoutContentType(t *testing.T) {
7879
th.SetupHTTP()
7980
defer th.TeardownHTTP()
80-
os.HandleCreateTypelessObjectSuccessfully(t)
8181

82-
content := strings.NewReader("The sky was the color of television, tuned to a dead channel.")
83-
res := Create(fake.ServiceClient(), "testContainer", "testObject", content, &os.CreateOpts{})
82+
content := "The sky was the color of television, tuned to a dead channel."
83+
os.HandleCreateTypelessObjectSuccessfully(t, content)
84+
85+
res := Create(fake.ServiceClient(), "testContainer", "testObject", strings.NewReader(content), &os.CreateOpts{})
8486
th.AssertNoErr(t, res.Err)
8587
}
8688

0 commit comments

Comments
 (0)