Add tests for exchange creation

This commit is contained in:
Maciej Małecki 2014-04-15 11:17:50 +02:00
parent 8ccf5bbf9e
commit 06242fe78a

View file

@ -26,4 +26,29 @@ describe('trader/api', function () {
}); });
}); });
}); });
it('should find and instantiate ticker and trade exchanges', function () {
var trader = new Trader(psqlInterface);
trader.configure({
exchanges: {
plugins: {
current: {
ticker: 'bitpay',
transfer: 'blockchain'
},
settings: {
bitpay: {},
blockchain: {}
}
},
settings: {
currency: 'USD',
lowBalanceMargin: 2
}
}
});
assert.ok(trader.tickerExchange);
assert.ok(trader.transferExchange);
});
}); });