Merge pull request #2184 from matiaspando/increaseCoverage

Increase coverage
This commit is contained in:
Matias Alejo Garcia 2014-12-18 14:55:08 -03:00
commit aa8d6f4754
3 changed files with 211 additions and 7 deletions

View file

@ -106,7 +106,10 @@ RateService.prototype.getHistoricRates = function(code, dates, cb) {
}, function(err, res, body) {
if (err || res.statusCode != 200 || !body) return cb(err || res);
if (!_.isArray(body)) {
body = [{ ts: dates[0], rate: body.rate }];
body = [{
ts: dates[0],
rate: body.rate
}];
}
return cb(null, body);
});