Skip to content
This repository
Browse code

Test for Content-Length header in multipart requests

  • Loading branch information...
commit 88c1437099090c4c9618a3ffb641d30bd5923ac7 1 parent 41cba25
Ask Bjørn Hansen abh authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 test/restler.js
6 test/restler.js
@@ -277,12 +277,14 @@ module.exports['Multipart'] = {
277 277
278 278 'Test multipart request with simple vars': function(test) {
279 279 rest.post(host, {
280   - data: { a: 1, b: 'thing' },
  280 + data: { a: 10, b: 'thing' },
281 281 multipart: true
282 282 }).on('complete', function(data) {
283 283 test.re(data, /content-type\: multipart\/form-data/, 'should set "content-type" header')
284   - test.re(data, /name="a"(\s)+1/, 'should send a=1');
  284 + test.re(data, /name="a"(\s)+10/, 'should send a=10');
285 285 test.re(data, /name="b"(\s)+thing/, 'should send b=thing');
  286 + test.re(data, /content-length: 200/, 'should send content-length header');
  287 +
286 288 test.done();
287 289 });
288 290 }

0 comments on commit 88c1437

Please sign in to comment.
Something went wrong with that request. Please try again.