Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit 4474c40

Browse files
author
Sukhveer Sanghera
authored
Merge pull request #42 from PolymathNetwork/test_fix2
fixed tests
2 parents aa4eac7 + d344a92 commit 4474c40

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

test/TestPolyDistribution.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -572,23 +572,6 @@ contract('PolyDistribution', function(accounts) {
572572
assert.equal(expectedTokenBalance.toString(10),new_tokenBalance.toString(10));
573573
});
574574

575-
it("should withdraw BONUS 1 tokens", async function () {
576-
let currentBlock = await web3.eth.getBlock("latest");
577-
578-
// Check token balance for account before calling transferTokens, then check afterwards.
579-
let tokenBalance = await polyToken.balanceOf(account_bonus1,{from:accounts[0]});
580-
await polyDistribution.transferTokens(account_bonus1,{from:accounts[0]});
581-
let new_tokenBalance = await polyToken.balanceOf(account_bonus1,{from:accounts[0]});
582-
583-
//PRESALE tokens are completely distributed once allocated as they have no vesting period nor cliff
584-
let allocation = await polyDistribution.allocations(account_bonus1,{from:account_owner});
585-
586-
logWithdrawalData("BONUS1",currentBlock.timestamp,account_bonus1,contractStartTime,allocation,new_tokenBalance);
587-
588-
let expectedTokenBalance = calculateExpectedTokens(allocation,currentBlock.timestamp,contractStartTime);
589-
assert.equal(expectedTokenBalance.toString(10),new_tokenBalance.toString(10));
590-
});
591-
592575
});
593576

594577
describe("Withdraw 15 months after allocations", async function () {
@@ -616,6 +599,23 @@ contract('PolyDistribution', function(accounts) {
616599
assert.equal(expectedTokenBalance.toString(10),new_tokenBalance.toString(10));
617600
});
618601

602+
it("should withdraw BONUS 1 tokens", async function () {
603+
let currentBlock = await web3.eth.getBlock("latest");
604+
605+
// Check token balance for account before calling transferTokens, then check afterwards.
606+
let tokenBalance = await polyToken.balanceOf(account_bonus1,{from:accounts[0]});
607+
await polyDistribution.transferTokens(account_bonus1,{from:accounts[0]});
608+
let new_tokenBalance = await polyToken.balanceOf(account_bonus1,{from:accounts[0]});
609+
610+
//PRESALE tokens are completely distributed once allocated as they have no vesting period nor cliff
611+
let allocation = await polyDistribution.allocations(account_bonus1,{from:account_owner});
612+
613+
logWithdrawalData("BONUS1",currentBlock.timestamp,account_bonus1,contractStartTime,allocation,new_tokenBalance);
614+
615+
let expectedTokenBalance = calculateExpectedTokens(allocation,currentBlock.timestamp,contractStartTime);
616+
assert.equal(expectedTokenBalance.toString(10),new_tokenBalance.toString(10));
617+
});
618+
619619
it("should withdraw RESERVE tokens", async function () {
620620
let currentBlock = await web3.eth.getBlock("latest");
621621

0 commit comments

Comments
 (0)