|
@@ -1,15 +1,10 @@
|
|
|
|
|
|
|
|
describe('when weekends option is set', function() {
|
|
describe('when weekends option is set', function() {
|
|
|
|
|
|
|
|
- beforeEach(function() {
|
|
|
|
|
- affix('#calendar');
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
it('should show sat and sun if true', function() {
|
|
it('should show sat and sun if true', function() {
|
|
|
- var options = {
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
weekends: true
|
|
weekends: true
|
|
|
- };
|
|
|
|
|
- $('#calendar').fullCalendar(options);
|
|
|
|
|
|
|
+ });
|
|
|
var sun = $('.fc-day-header.fc-sun')[0];
|
|
var sun = $('.fc-day-header.fc-sun')[0];
|
|
|
var sat = $('.fc-day-header.fc-sun')[0];
|
|
var sat = $('.fc-day-header.fc-sun')[0];
|
|
|
expect(sun).toBeDefined();
|
|
expect(sun).toBeDefined();
|
|
@@ -17,10 +12,9 @@ describe('when weekends option is set', function() {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('should not show sat and sun if false', function() {
|
|
it('should not show sat and sun if false', function() {
|
|
|
- var options = {
|
|
|
|
|
|
|
+ initCalendar({
|
|
|
weekends: false
|
|
weekends: false
|
|
|
- };
|
|
|
|
|
- $('#calendar').fullCalendar(options);
|
|
|
|
|
|
|
+ });
|
|
|
var sun = $('.fc-day-header.fc-sun')[0];
|
|
var sun = $('.fc-day-header.fc-sun')[0];
|
|
|
var sat = $('.fc-day-header.fc-sun')[0];
|
|
var sat = $('.fc-day-header.fc-sun')[0];
|
|
|
expect(sun).not.toBeDefined();
|
|
expect(sun).not.toBeDefined();
|