Просмотр исходного кода

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

Adam Shaw 11 лет назад
Родитель
Сommit
ab04d1206b
1 измененных файлов с 5 добавлено и 8 удалено
  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: {
 				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.eventAfterAllRender = function() {
-			var request = $.mockjax.mockedAjaxCalls()[0];
-			expect(request.data.customParam).toMatch('yes');
-			expect(eventSource.success.calls.count()).toEqual(1);
-			done();
-		};
 		$('#cal').fullCalendar(options);
 	});