未验证 提交 ef9ffabd 编写于 作者: S sercan

fixes the test case of #502

上级 af3ffd11
......@@ -188,14 +188,31 @@ describe('Communicator', () => {
const methodName = 'command';
// execute
Communicator.call({ methodName, args: { command: 'test', runOnAdminDB: true, options: { xxx: 123 } }, callback() {} });
Communicator.call({ methodName, args: { command: { blabla: true }, runOnAdminDB: true, options: { xxx: 123 } }, callback() {} });
// verify
assertExecution(methodName);
expect(Meteor.call.getCall(0).args[1]).to.eql({
sessionId: Meteor.default_connection._lastSessionId,
command: 'test',
runOnAdminDB: true,
command: { blabla: true },
options: { xxx: 123 }
});
});
it('command (1)', () => {
// prepare
const methodName = 'command';
// execute
Communicator.call({ methodName, args: { command: 'testing', runOnAdminDB: true, options: { xxx: 123 } }, callback() {} });
// verify
assertExecution(methodName);
expect(Meteor.call.getCall(0).args[1]).to.eql({
sessionId: Meteor.default_connection._lastSessionId,
runOnAdminDB: true,
command: { },
options: { xxx: 123 }
});
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册