Skip to content

Commit

Permalink
Remove object form encoding test.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgraham committed Nov 2, 2014
1 parent 531c68f commit bea0310
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,31 +108,14 @@ if (blobSupport) {
})
}

asyncTest('post sends encoded body', 2, function() {
fetch('/request', {
method: 'post',
body: {
name: 'Hubot',
title: 'Hubot Robawt',
undef: undefined,
nil: null
}
}).then(function(response) {
return response.json()
}).then(function(json) {
equal(json.method, 'POST')
equal(json.data, 'name=Hubot&title=Hubot+Robawt&nil=')
start()
})
})

asyncTest('post sets content-type header', 1, function() {
asyncTest('post sets content-type header', 2, function() {
fetch('/request', {
method: 'post',
body: new FormData()
}).then(function(response) {
return response.json()
}).then(function(json) {
equal(json.method, 'POST')
ok(/^multipart\/form-data;/.test(json.headers['content-type']))
start()
})
Expand Down

0 comments on commit bea0310

Please sign in to comment.