Tested and Audited appendWeeks function

This commit is contained in:
David E. Perez Negron Rocha 2020-06-08 14:39:52 -05:00
parent 618de6cb61
commit 83414e1780
1 changed files with 67 additions and 52 deletions

View File

@ -84,6 +84,7 @@ contract('DECA', function (accs) {
})
}),
describe('check pause', function () {
it('should get/set pause', async function () {
let p = await this.deca.getPause.call();
@ -199,8 +200,22 @@ contract('DECA', function (accs) {
assert.equal(true, wasErr, "crowdsale should be stopped")
})
it('check appendWeeks', async function () {
await increaseTime(duration.weeks(10))
// get endDate before
let endDateBefore = await this.deca.endDate.call();
// add one week
await this.deca.appendWeeks(1, {
from: this.creator.address,
gas: 6712390
});
// get endDate after
let endDateAfter = await this.deca.endDate.call();
// 1 week = 604800 seconds
assert.equal(604800, endDateAfter - endDateBefore, "appendWeeks does not work");
})
})
describe('transferAnyERC20Token', async function () {
it('check transfer from external', async function () {