Browse Source

Update tests

acerix 8 years ago
parent
commit
6454d0c4ca
1 changed files with 7 additions and 11 deletions
  1. 7 11
      tests/legacy/weekViewRender.js

+ 7 - 11
tests/legacy/weekViewRender.js

@@ -1,23 +1,19 @@
 describe('weekViewRender', function() {
 
-	beforeEach(function() {
-		affix('#cal');
+	var nowStr = $.fullCalendar.moment(new Date()).format('YYYY-MM-DD');
+
+	pushOptions({
+		defaultDate: nowStr,
+		defaultView: 'agendaWeek'
 	});
 
 	describe('verify th class for today', function() {
-		var nowStr = $.fullCalendar.moment(new Date()).format('YYYY-MM-DD');
-
-		beforeEach(function() {
-			$('#cal').fullCalendar({
-				defaultDate: nowStr,
-				defaultView: 'agendaWeek'
-			});
-		});
 
 		it('should have fc-today class only on "today"', function() {
+			initCalendar();
 			var foundToday = false;
 
-			$('#cal th.fc-day-header').each(function(i, headerNode) {
+			$('th.fc-day-header', currentCalendar.el).each(function(i, headerNode) {
 				var headerEl = $(headerNode);
 				var dateMatchesToday = headerEl.data('date') === nowStr;
 				var hasTodayClass = headerEl.hasClass('fc-today');