mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-11 00:40:19 +08:00
30 lines
691 B
JavaScript
30 lines
691 B
JavaScript
|
|
describe('when weekends option is set', function() {
|
|
|
|
beforeEach(function() {
|
|
affix('#calendar');
|
|
});
|
|
|
|
it('should show sat and sun if true', function() {
|
|
var options = {
|
|
weekends: true
|
|
};
|
|
$('#calendar').fullCalendar(options);
|
|
var sun = $('.fc-day-header.fc-sun')[0];
|
|
var sat = $('.fc-day-header.fc-sun')[0];
|
|
expect(sun).toBeDefined();
|
|
expect(sat).toBeDefined();
|
|
});
|
|
|
|
it('should not show sat and sun if false', function() {
|
|
var options = {
|
|
weekends: false
|
|
};
|
|
$('#calendar').fullCalendar(options);
|
|
var sun = $('.fc-day-header.fc-sun')[0];
|
|
var sat = $('.fc-day-header.fc-sun')[0];
|
|
expect(sun).not.toBeDefined();
|
|
expect(sat).not.toBeDefined();
|
|
});
|
|
|
|
}); |