restore previous test
This commit is contained in:
parent
a5e44070b9
commit
1a047ff2a0
|
@ -2432,7 +2432,7 @@ describe('Wallet service', function() {
|
||||||
it('should not use UTXO provided in utxosToExclude option', function(done) {
|
it('should not use UTXO provided in utxosToExclude option', function(done) {
|
||||||
helpers.stubUtxos(server, wallet, [1, 2, 3], function(utxos) {
|
helpers.stubUtxos(server, wallet, [1, 2, 3], function(utxos) {
|
||||||
var txOpts = helpers.createSimpleProposalOpts('18PzpUFkFZE8zKWUPvfykkTxmB9oMR8qP7', 4.5, 'some message', TestData.copayers[0].privKey_1H_0);
|
var txOpts = helpers.createSimpleProposalOpts('18PzpUFkFZE8zKWUPvfykkTxmB9oMR8qP7', 4.5, 'some message', TestData.copayers[0].privKey_1H_0);
|
||||||
txOpts.utxosToExclude = [ utxos[1].txid + ':' + utxos[1].vout ];
|
txOpts.utxosToExclude = [utxos[1].txid + ':' + utxos[1].vout];
|
||||||
server.createTx(txOpts, function(err, tx) {
|
server.createTx(txOpts, function(err, tx) {
|
||||||
should.exist(err);
|
should.exist(err);
|
||||||
err.code.should.equal('INSUFFICIENT_FUNDS');
|
err.code.should.equal('INSUFFICIENT_FUNDS');
|
||||||
|
@ -2441,6 +2441,19 @@ describe('Wallet service', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
it('should use non-excluded UTXOs', function(done) {
|
||||||
|
helpers.stubUtxos(server, wallet, [1, 2], function(utxos) {
|
||||||
|
var txOpts = helpers.createSimpleProposalOpts('18PzpUFkFZE8zKWUPvfykkTxmB9oMR8qP7', 0.5, 'some message', TestData.copayers[0].privKey_1H_0);
|
||||||
|
txOpts.utxosToExclude = [utxos[0].txid + ':' + utxos[0].vout];
|
||||||
|
server.createTx(txOpts, function(err, tx) {
|
||||||
|
should.not.exist(err);
|
||||||
|
tx.inputs.length.should.equal(1);
|
||||||
|
tx.inputs[0].txid.should.equal(utxos[1].txid);
|
||||||
|
tx.inputs[0].vout.should.equal(utxos[1].vout);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('#createTx backoff time', function(done) {
|
describe('#createTx backoff time', function(done) {
|
||||||
|
|
Loading…
Reference in New Issue