Add more tests to controller
This commit is contained in:
parent
cf143898f9
commit
ac6dfc8035
3 changed files with 49 additions and 10 deletions
|
|
@ -29,7 +29,7 @@ var RateService = function(request) {
|
|||
that.isAvailable = true;
|
||||
that.rates = rates;
|
||||
that.queued.forEach(function(callback) {
|
||||
setTimeout(callback, 0);
|
||||
setTimeout(callback, 1);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -38,7 +38,7 @@ var RateService = function(request) {
|
|||
|
||||
RateService.prototype.whenAvailable = function(callback) {
|
||||
if (this.isAvailable) {
|
||||
setTimeout(callback, 0);
|
||||
setTimeout(callback, 1);
|
||||
} else {
|
||||
this.queued.push(callback);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue