Skip to content

Commit

Permalink
Made the unit-tests a bit more complete
Browse files Browse the repository at this point in the history
  • Loading branch information
supernomad committed Jun 21, 2015
1 parent fafc665 commit fc05202
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions test/routes/chunked-upload-routes-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ describe("chunked-upload-routes.js", function() {
routes.post.handler({
body: {
fileName: "Testing.txt",
fileSize: 1024,
fileSize: 2048,
chunkSize: 1024,
count: 1,
count: 2,
destination: "Test/destination"
}
}, {
Expand Down Expand Up @@ -139,8 +139,26 @@ describe("chunked-upload-routes.js", function() {
should.exist(data);
should.exist(data.data);
data.data.should.be.an.String;
data.data.should.equal("Upload Complete");
done();
data.data.should.equal("Chunk Recieved");
routes.put.handler({
params: {
uploadId: uploadId,
index: 1
},
files: {
testFile: {
path: "random/path/to/nothing"
}
}
}, {
json: function(data) {
should.exist(data);
should.exist(data.data);
data.data.should.be.an.String;
data.data.should.equal("Upload Complete");
done();
}
});
}
});
});
Expand Down

0 comments on commit fc05202

Please sign in to comment.