Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
mrashed-dev committed Nov 24, 2023
1 parent e228898 commit 7e0432c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions __tests__/event-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,20 @@ describe('Event', () => {
done();
});
});

test('should set visibility to undefined if set to an empty string', done => {
testContext.event.visibility = '';
return testContext.event.save().then(() => {
const options = testContext.connection.request.mock.calls[0][0];
expect(JSON.parse(options.body)).toEqual({
visibility: undefined,
calendar_id: '',
when: {},
participants: [],
});
done();
});
});
});

describe('notification', () => {
Expand Down

0 comments on commit 7e0432c

Please sign in to comment.