mavensmate
Version:
Core APIs that drive MavensMate IDEs for Salesforce1/Force.com
36 lines (28 loc) • 879 B
JavaScript
;
var assert = require('assert');
var sinon = require('sinon');
var util = require('../../../../app/lib/util');
var helper = require('../../../test-helper');
var commandExecutor = require('../../../../app/lib/commands')();
describe('mavensmate list-projects-cli', function(){
var program;
var commandExecutorStub;
var getPayloadStub;
before(function() {
program = helper.initCli();
});
beforeEach(function() {
commandExecutorStub = sinon.stub(program.commandExecutor, 'execute');
});
afterEach(function() {
commandExecutorStub.restore();
});
it('should call directly', function(done) {
program._events['list-projects']();
commandExecutorStub.calledOnce.should.equal(true);
assert(commandExecutorStub.calledWithMatch({
name: 'list-projects'
}));
done();
});
});