Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmrigney committed Oct 14, 2016
1 parent c7c8eef commit 677f83b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions test/s3stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,19 @@ class S3Stub {
process.nextTick(() => cb(null, {}));
}

upload(params, cb) {
var key = params.Key;
var stream = params.Body;
var buffer = new Buffer(0);
stream.on('data', (d) => {
buffer = Buffer.concat([buffer, d]);
});
stream.on('finish', () => {
this.objects[key] = { data: buffer, size: buffer.length, LastModified: new Date() };
cb(null, {});
});
}

putObject(params, cb) {
var key = params.Key;
var body = params.Body;
Expand Down
2 changes: 1 addition & 1 deletion test/sftp.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ describe("SFTP", function() {
return done(err);

expect(lst.length).to.equal(1);
expect(lst[0].filename).to.equal('/abc.txt');
expect(lst[0].filename).to.equal('abc.txt');
done();
});
});
Expand Down

0 comments on commit 677f83b

Please sign in to comment.