Add tests for exchange creation
This commit is contained in:
parent
8ccf5bbf9e
commit
06242fe78a
1 changed files with 25 additions and 0 deletions
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue