| 491 | }); |
| 492 | |
| 493 | function createRequest(separator) { |
| 494 | var url = 'http://localhost:' + server.address().port + '/upload'; |
| 495 | var req = superagent.post(url); |
| 496 | req.attach('files[]', fixture('pf1y5.png'), 'SOG2.JPG'); |
| 497 | req.attach('files[]', fixture('binaryfile.tar.gz'), 'BenF364_LIB353.zip'); |
| 498 | |
| 499 | req.end(function(err, resp) { |
| 500 | assert.ifError(err); |
| 501 | // We don't close the server, to allow other requests to pass. |
| 502 | }); |
| 503 | } |
| 504 | |
| 505 | function fixture(name) { |
| 506 | return path.join(FIXTURE_PATH, 'file', name) |