eventMouseover.js
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
describe('eventMouseover', function() {
var options;
beforeEach(function() {
affix('#cal');
options = {
defaultDate: '2014-08-01',
scrollTime: '00:00:00'
};
});
[ 'month', 'agendaWeek' ].forEach(function(viewName) {
describe('for ' + viewName + ' view', function() {
beforeEach(function() {
options.defaultView = viewName;
});
it('will trigger a eventMouseout with updateEvent', function(done) {
options.events = [ {
title: 'event',
start: '2014-08-02T01:00:00',
className: 'event'
} ];
options.eventMouseover = function(event, ev) {
expect(typeof event).toBe('object');
expect(typeof ev).toBe('object');
event.title = 'YO';
$('#cal').fullCalendar('updateEvent', event);
};
options.eventMouseout = function(event, ev) {
expect(typeof event).toBe('object');
expect(typeof ev).toBe('object');
done();
};
spyOn(options, 'eventMouseout').and.callThrough();
$('#cal').fullCalendar(options);
$('.event').simulate('mouseover');
});
});
});
});