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

This commit is contained in:
Adam Shaw
2014-06-01 18:15:57 -07:00
parent 63cdff6880
commit ab04d1206b
+5 -8
View File
@@ -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);
});