Explorar el Código

simplify json-feed jQuery ajax test. make it work in IE8

Adam Shaw hace 11 años
padre
commit
ab04d1206b
Se han modificado 1 ficheros con 5 adiciones y 8 borrados
  1. 5 8
      tests/automated/events-json-feed.js

+ 5 - 8
tests/automated/events-json-feed.js

@@ -91,16 +91,13 @@ describe('events as a json feed', function() {
 			data: {
 			data: {
 				customParam: 'yes'
 				customParam: 'yes'
 			},
 			},
-			success: function() { }
+			success: function() {
+				var request = $.mockjax.mockedAjaxCalls()[0];
+				expect(request.data.customParam).toMatch('yes');
+				done();
+			}
 		};
 		};
-		spyOn(eventSource, 'success').and.callThrough();
 		options.eventSources = [ eventSource ];
 		options.eventSources = [ eventSource ];
-		options.eventAfterAllRender = function() {
-			var request = $.mockjax.mockedAjaxCalls()[0];
-			expect(request.data.customParam).toMatch('yes');
-			expect(eventSource.success.calls.count()).toEqual(1);
-			done();
-		};
 		$('#cal').fullCalendar(options);
 		$('#cal').fullCalendar(options);
 	});
 	});