Skip to content

Instantly share code, notes, and snippets.

@deanlandolt
Created August 18, 2010 03:31
Show Gist options
  • Save deanlandolt/533283 to your computer and use it in GitHub Desktop.
Save deanlandolt/533283 to your computer and use it in GitHub Desktop.
var fileId = JSON.parse(mock.POST("/File/", {
headers: {
"content-type": "text/plain",
"content-disposition": "attachment",
accept: "application/json"
},
body: {forEach: function(write) {
write("foo\r\nbar\r\nbaz");
}}
}).body).id;
assert.equal(mock.GET("/File/" + fileId).body, "foo\r\nbar\r\nbaz");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment