diff --git a/test/streams.js b/test/streams.js index 8454993..8f8b857 100644 --- a/test/streams.js +++ b/test/streams.js @@ -31,7 +31,10 @@ describe('strong-remoting', function() { it('should stream the file output', function(done) { remotes.fs = fs; fs.createReadStream.shared = true; - fs.createReadStream.accepts = [{arg: 'path', type: 'string'}]; + fs.createReadStream.accepts = [ + { arg: 'path', type: 'string' }, + { arg: 'encoding', type: 'string' } + ]; fs.createReadStream.returns = {arg: 'res', type: 'stream'}; fs.createReadStream.http = { verb: 'get', @@ -41,7 +44,7 @@ describe('strong-remoting', function() { } }; - json('get', '/fs/createReadStream?path=' + __dirname + '/data/foo.json') + json('get', '/fs/createReadStream?path=' + __dirname + '/data/foo.json&encoding=utf8') .expect({bar: 'baz'}, done); }); });