Merge branch 'master' of https://github.com/illiptic/jasmine-ajax into illiptic-master

This commit is contained in:
Gregg Van Hove and Molly Trombley-McCann 2015-03-04 09:42:08 -08:00
commit ef26ab41af
2 changed files with 18 additions and 2 deletions

View File

@ -204,10 +204,18 @@ getJasmineRequireObj().AjaxFakeRequest = function() {
self = this;
this.events[event] = function() {
callback.apply(self);
callback.apply(self, [{}]);
existingCallback();
};
},
removeEventListener: function(event, callback) {
var existingCallback = this.events[event];
if(existingCallback){
delete this.events[event];
}
},
status: null,

View File

@ -159,10 +159,18 @@ getJasmineRequireObj().AjaxFakeRequest = function() {
self = this;
this.events[event] = function() {
callback.apply(self);
callback.apply(self, [{}]);
existingCallback();
};
},
removeEventListener: function(event, callback) {
var existingCallback = this.events[event];
if(existingCallback){
delete this.events[event];
}
},
status: null,