未验证 提交 9e41cbfb 编写于 作者: R rsercano

#480 fixed uploadFile test

上级 ad8a595e
......@@ -632,16 +632,17 @@ describe('Communicator', () => {
it('uploadFile', () => {
// prepare
const methodName = 'uploadFile';
const blob = new Uint8Array([22, 33]);
// execute
Communicator.call({ methodName, args: { blob: [{ some_byte_array: 123 }], fileName: 'sercan', contentType: 'application/json', name: 'sercan' }, callback() {} });
Communicator.call({ methodName, args: { blob, fileName: 'sercan', contentType: 'application/json', name: 'sercan' }, callback() {} });
// verify
assertExecution(methodName);
expect(Meteor.call.getCall(0).args[1]).to.eql({
sessionId: Meteor.default_connection._lastSessionId,
bucketName: 'fs',
blob: [{ some_byte_array: 123 }],
blob,
fileName: 'sercan',
contentType: 'application/json',
metaData: {},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册