Skip to content

Commit d91378c

Browse files
committed
+ test: headers
1 parent 9ec6dab commit d91378c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/tests.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,15 @@ module('FileAPI');
231231
FileAPI.upload({
232232
url: 'http://rubaxa.org/FileAPI/server/ctrl.php',
233233
data: { str: 'foo', num: 1, array: [1, 2, 3], object: { foo: 'bar' } },
234+
headers: { 'x-foo': 'bar' },
234235
complete: function (err, xhr){
235236
var res = FileAPI.parseJSON(xhr.responseText).data._REQUEST;
237+
var headers = FileAPI.parseJSON(xhr.responseText).data.HEADERS;
236238

237239
start();
238240
equal(res.str, 'foo');
239241
equal(res.num, '1');
242+
equal(headers['X-Foo'], 'bar');
240243

241244
if( !FileAPI.html5 ){
242245
deepEqual(res.array, { "0": '1', "1": '2', "2": '3' });

0 commit comments

Comments
 (0)