Ver Fonte

inline checkAllEvents

Adam Shaw há 9 anos atrás
pai
commit
113e604035
1 ficheiros alterados com 4 adições e 8 exclusões
  1. 4 8
      tests/automated/refetchEvents.js

+ 4 - 8
tests/automated/refetchEvents.js

@@ -80,7 +80,8 @@ describe('refetchEvents', function() {
 				calendarEl.fullCalendar(options);
 				fetchCount++;
 				calendarEl.fullCalendar('refetchEvents');
-				checkAllEvents();
+				expect($('.fetch0').length).toEqual(0);
+				expect($('.fetch1').length).toEqual(3);
 				done();
 			});
 		});
@@ -107,7 +108,8 @@ describe('refetchEvents', function() {
 						expect($('.fetch1').length).toEqual(0); // new events not yet refetched
 
 						setTimeout(function() {
-							checkAllEvents();
+							expect($('.fetch0').length).toEqual(0);
+							expect($('.fetch1').length).toEqual(3);
 							done();
 						}, 100);
 					}
@@ -126,11 +128,5 @@ describe('refetchEvents', function() {
 				callback(events);
 			};
 		}
-
-		// Checks to make sure all refetched events have been rendered
-		function checkAllEvents() {
-			expect($('.fetch0').length).toEqual(0);
-			expect($('.fetch1').length).toEqual(3);
-		}
 	});
 });