Skip to content

Commit 9a6afeb

Browse files
author
Ben Stahl
committed
Ensure a provided uri is passed to gcs-resumable-upload
1 parent 0fbd22f commit 9a6afeb

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

test/storage/file.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,21 @@ describe('File', function() {
10731073
writable.end('data');
10741074
});
10751075

1076+
it('should pass through a provided uri', function(done) {
1077+
var options = {
1078+
uri: 'https://www.googleapis.com/afakeuri'
1079+
};
1080+
1081+
var writable = file.createWriteStream(options);
1082+
1083+
file.startResumableUpload_ = function(stream, options_) {
1084+
assert.deepEqual(options_.uri, options.uri);
1085+
done();
1086+
};
1087+
1088+
writable.write('data');
1089+
});
1090+
10761091
describe('validation', function() {
10771092
var data = 'test';
10781093

0 commit comments

Comments
 (0)