Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added multiple file and binary file upload tests

  • Loading branch information...
commit fc1004e9df3acb5660102cd405292d34ed08d61a 1 parent 84069fd
@DamonOehlman authored
View
1  .gitignore
@@ -1,2 +1,3 @@
+.DS_Store
node_modules
examples/output
View
2  test/helpers/compareFiles.js
@@ -27,7 +27,7 @@ module.exports = function(targetPath, couchurl, name, callback) {
});
}
- return function(callback) {
+ return function() {
fs.readdir(targetPath, function(err, files) {
async.forEach(files || [], compareItem, callback);
});
View
BIN  test/testdata/input/binary/Martian_rover_Curiosity_using_ChemCam_Msl20111115_PIA14760_MSL_PIcture-3-br2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 test/testdata/input/binary/Martian_rover_Curiosity_using_ChemCam_Msl20111115_PIA14760_MSL_PIcture-3-br2.txt
@@ -0,0 +1,5 @@
+Description
+English: This artist's concept depicts the rover Curiosity, of NASA's Mars Science Laboratory mission, as it uses its Chemistry and Camera (ChemCam) instrument to investigate the composition of a rock surface. ChemCam fires laser pulses at a target and views the resulting spark with a telescope and spectrometers to identify chemical elements. The laser is actually in an invisible infrared wavelength, but is shown here as visible red light for purposes of illustration.
+Date 9 November 2011
+Source http://marsprogram.jpl.nasa.gov/msl/multimedia/images/?ImageID=3710
+Author NASA/JPL-Caltech
View
1  test/testdata/input/multiple/test.txt
@@ -0,0 +1 @@
+helloWorld
View
1  test/testdata/input/multiple/test2.txt
@@ -0,0 +1 @@
+Another test
View
2  test/upload.js
@@ -27,6 +27,8 @@ describe('upload tests', function() {
describe('long format', function(done) {
it('should be able upload a directory containing a single file', uploadAndCheck('single'));
+ it('should be able to upload a directory with multiple files', uploadAndCheck('multiple'));
+ it('should be able to upload a directory with binary files', uploadAndCheck('binary'));
});
describe('short format', function() {
Please sign in to comment.
Something went wrong with that request. Please try again.