acerix 8 lat temu
rodzic
commit
9ddac87b7f
1 zmienionych plików z 12 dodań i 14 usunięć
  1. 12 14
      tests/legacy/slotLabelFormat.js

+ 12 - 14
tests/legacy/slotLabelFormat.js

@@ -1,33 +1,31 @@
 describe('slotLabelFormat', function() {
 
-	var options;
+	pushOptions({
+		defaultDate: '2014-06-04',
+		defaultView: 'agendaWeek'
+	});
 
 	function getAxisText() {
 		return $('.fc-slats tr:first-child .fc-time').text();
 	}
 
-	beforeEach(function() {
-		affix('#cal');
-		options = {
-			defaultDate: '2014-06-04',
-			defaultView: 'agendaWeek'
-		};
-	});
-
 	it('renders correctly when default', function() {
-		$('#cal').fullCalendar(options);
+		initCalendar();
 		expect(getAxisText()).toBe('12am');
 	});
 
 	it('renders correctly when default and the locale is customized', function() {
-		options.locale = 'en-gb';
-		$('#cal').fullCalendar(options);
+		initCalendar({
+			locale: 'en-gb'
+		});
 		expect(getAxisText()).toBe('00');
 	});
 
 	it('renders correctly when customized', function() {
-		options.slotLabelFormat = 'H:mm:mm[!]';
-		$('#cal').fullCalendar(options);
+		initCalendar({
+			slotLabelFormat: 'H:mm:mm[!]'
+		});
 		expect(getAxisText()).toBe('0:00:00!');
 	});
+
 });