Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const jsforceStub = {
- Connection: function(obj) {
- this.userInfo = { id: 'testUserId', organizationId: 'testOrganizationId' };
- this.loginAsync = function(user, pass, cb) {
- if (user === 'username' && pass === 'password') return Promise.resolve(this.userInfo);
- else {
- return Promise.reject(
- new Error('INVALID_LOGIN: Invalid username, password, security token; or user locked out.')
- );
- }
- };
- return this;
- }
- };
- let salesforceConnection = proxyquire('../../lib/external/salesforce/salesforceConnection', {
- jsforce: jsforceStub
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement