Răsfoiți Sursa

fixup some existing tests

Adam Shaw 12 ani în urmă
părinte
comite
588fc25e39

+ 5 - 6
tests/automated/aspectRatio.js

@@ -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
tests/automated/firstDay.js

@@ -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
tests/automated/handleWindowResize.js

@@ -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({