fixup some existing tests

This commit is contained in:
Adam Shaw
2014-01-28 00:22:25 -08:00
parent d4be172f56
commit 588fc25e39
3 changed files with 16 additions and 18 deletions
+5 -6
View File
@@ -128,12 +128,11 @@ describe('aspectRatio', function() {
var width = $('.fc-content').width();
expect(width).toEqual(1000);
});
it('should set the height to width ratio to 0.5', function() {
var width = $('.fc-content').width();
var height = $('.fc-content').height();
var pxHeightPerCharacter = 22;
var defaultWeeksInCal = 7;
expect(height).toEqual(pxHeightPerCharacter * defaultWeeksInCal)
it('should cause rows to be natural height', function() {
var actualHeight = $('.fc-content').height();
$('tr.fc-week td:first-child > div').css('min-height', '').css('background', 'red');
var naturalHeight = $('.fc-content').height();
expect(actualHeight).toEqual(naturalHeight)
});
});
});
+9 -11
View File
@@ -149,19 +149,17 @@ describe('First Day', function() {
});
describe('when new firstDay options are set', function() {
it('should change the first day of the week', function() {
var options = {
it('should change the first day of week to Monday', function() {
$('#cal').fullCalendar({
firstDay: 1
};
$('#cal').fullCalendar(options);
var firstDayBeforeChange = $('.fc-day-header')[0];
var newOptions = {
});
expect($('.fc-day-header')[0]).toHaveClass('fc-mon');
});
it('shoule change the first day of week to Thursday', function() {
$('#cal').fullCalendar({
firstDay: 4
};
$('#cal').fullCalendar(newOptions);
var firstDayAfterChange = $('.fc-day-header')[0];
expect(firstDayBeforeChange).toHaveClass('fc-mon');
expect(firstDayAfterChange).toHaveClass('fc-thu');
});
expect($('.fc-day-header')[0]).toHaveClass('fc-thu');
});
});
});
+2 -1
View File
@@ -5,7 +5,8 @@ describe('handleWindowResize', function() {
affix('#cal');
});
describe('When default is used, should fire resize event', function() {
// not true
xdescribe('When default is used, should fire resize event', function() {
it('should fire resize', function() {
var resized = 0;
$('#cal').fullCalendar({