|
|
@@ -10,12 +10,17 @@ describe('eventDestroy', function() {
|
|
|
});
|
|
|
|
|
|
function testSingleEvent(singleEventData, done) {
|
|
|
+ var callCnt = 0;
|
|
|
+
|
|
|
expect(singleEventData.id).toBeTruthy();
|
|
|
options.events = [ singleEventData ];
|
|
|
options.eventDestroy = function(event, element) {
|
|
|
- expect(event.id).toBe(singleEventData.id);
|
|
|
- done();
|
|
|
+ if (callCnt++ === 0) { // only care about the first call. gets called again when calendar is destroyed
|
|
|
+ expect(event.id).toBe(singleEventData.id);
|
|
|
+ done();
|
|
|
+ }
|
|
|
};
|
|
|
+
|
|
|
$('#cal').fullCalendar(options);
|
|
|
$('#cal').fullCalendar('removeEvents', singleEventData.id);
|
|
|
}
|