Skip to content

Commit b6085a7

Browse files
author
Igor Drobiazko
committed
Try smaller message
1 parent 334d910 commit b6085a7

File tree

2 files changed

+10
-31
lines changed

2 files changed

+10
-31
lines changed

lib/actions/createEvent.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,16 @@ function processAction(msg, cfg) {
4545
data.calendarId = cfg.calendarId;
4646
console.log('Successfully created event with ID=' + id);
4747
console.log('Emitting data ...');
48-
console.log("---DATA---");
49-
console.log("%j", data);
50-
console.log("---MSG---");
51-
console.log("%j", messages.newMessageWithBody(data));
52-
self.emit('data', messages.newMessageWithBody(data));
48+
console.log('---DATA---');
49+
console.log('%j', data);
50+
console.log('---MSG---');
51+
console.log('%j', messages.newMessageWithBody(data));
52+
let messageBody = {
53+
id,
54+
calendarId: cfg.calendarId
55+
};
56+
console.log('Emitting data ...');
57+
self.emit('data', messages.newMessageWithBody(messageBody));
5358
}
5459

5560
function emitError(e) {

spec/actions/createEvent.spec.js

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,6 @@ describe('Outlook Create Event', function test() {
3636
expect(calls.argsFor(1)[0]).toEqual('end');
3737
expect(calls.argsFor(0)[1].body).toEqual({
3838
id: 'testid12345',
39-
subject: 'Unit Test - Simple Event',
40-
body: {
41-
contentType: 'HTML',
42-
content: 'This is a test.'
43-
},
44-
start: {
45-
dateTime: '2017-05-19T18:00:00',
46-
timeZone: 'Central European Standard Time'
47-
},
48-
end: {
49-
dateTime: '2017-05-20T19:00:00',
50-
timeZone: 'Central European Standard Time'
51-
},
5239
calendarId: 'AAMkAGYyNmJlYjBmLTgwOWYtNGU0Mi04NW'
5340
});
5441
expect(scope1.isDone()).toBeTruthy();
@@ -79,19 +66,6 @@ describe('Outlook Create Event', function test() {
7966
expect(calls.argsFor(1)[0]).toEqual('end');
8067
expect(calls.argsFor(0)[1].body).toEqual({
8168
id: 'testid12345',
82-
subject: 'Unit Test - Simple Event',
83-
body: {
84-
contentType: 'HTML',
85-
content: 'This is a test.'
86-
},
87-
start: {
88-
dateTime: '2017-05-19T18:00:00',
89-
timeZone: 'Central European Standard Time'
90-
},
91-
end: {
92-
dateTime: '2017-05-20T19:00:00',
93-
timeZone: 'Central European Standard Time'
94-
},
9569
calendarId: 'AAMkAGYyNmJlYjBmLTgwOWYtNGU0Mi04NW'
9670
});
9771
expect(scope1.isDone()).toBeTruthy();

0 commit comments

Comments
 (0)