Skip to content

Commit

Permalink
Merge pull request #516 from LiskHQ/400-dapps-test-fix
Browse files Browse the repository at this point in the history
Improving block reward and dapps test stability - Addresses #400
  • Loading branch information
karmacoma committed Mar 28, 2017
2 parents efc2729 + 716358d commit 8e7cc9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions test/api/dapps.js
Expand Up @@ -773,18 +773,8 @@ describe('PUT /api/dapps/withdrawal', function () {

putWithdrawal(validParams, function (err, res) {
node.expect(res.body).to.have.property('success').to.be.not.ok;
if (res.body.error !== 'Transaction is already processed: ' + validParams.transactionId) {
node.get('/api/transactions/queued', function (err, trsRes) {
node.expect(trsRes.body).to.have.property('success').to.be.ok;
node.expect(trsRes.body.transactions).to.be.an('array').and.to.have.length.of.at.least(1);
var trsQueued = trsRes.body.transactions.find(function (t) {
return t.asset.outTransfer.transactionId === validParams.transactionId;
});
node.expect(trsQueued).to.be.not.empty;
node.expect(res.body).to.have.property('error').to.equal('Transaction is already processed: ' + trsQueued.id);
done();
});
}
node.expect(res.body).to.have.property('error').to.contain('Transaction is already processed');
done();
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/unit/logic/blockReward.js
Expand Up @@ -435,7 +435,7 @@ describe('BlockReward', function () {
var supply = blockReward.calcSupply(13451519);
var prev = supply;

for (var i = 13451520; i < (13451520 * 2); i++) {
for (var i = 13451520; i < (13451520 + 100); i++) {
supply = blockReward.calcSupply(i);
expect(supply).to.equal(prev + constants.rewards.milestones[4]);
prev = supply;
Expand Down

0 comments on commit 8e7cc9c

Please sign in to comment.