update test case
This commit is contained in:
@@ -72,34 +72,69 @@ describe("VDODO", () => {
|
|||||||
decimalStr("0")
|
decimalStr("0")
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
it("vdodo first mint with no superior", async () => {
|
// it("vdodo first mint with no superior", async () => {
|
||||||
|
|
||||||
await ctx.VDODO.methods.mint(decimalStr("10"),"0x0000000000000000000000000000000000000000").send(ctx.sendParam(account0))
|
// await ctx.VDODO.methods.mint(decimalStr("10"),"0x0000000000000000000000000000000000000000").send(ctx.sendParam(account0))
|
||||||
assert.equal(
|
// assert.equal(
|
||||||
await ctx.DODO.methods.balanceOf(account0).call(),
|
// await ctx.DODO.methods.balanceOf(account0).call(),
|
||||||
decimalStr("990")
|
// decimalStr("990")
|
||||||
);
|
// );
|
||||||
assert.equal(
|
// assert.equal(
|
||||||
await await ctx.VDODO.methods.alpha().call(),
|
// await await ctx.VDODO.methods.alpha().call(),
|
||||||
await ctx.alpha
|
// await ctx.alpha
|
||||||
);
|
// );
|
||||||
assert.equal(
|
// assert.equal(
|
||||||
await ctx.DODO.methods.balanceOf(ctx.VDODO.options.address).call(),
|
// await ctx.DODO.methods.balanceOf(ctx.VDODO.options.address).call(),
|
||||||
decimalStr("10")
|
// decimalStr("10")
|
||||||
);
|
// );
|
||||||
assert.equal(
|
// assert.equal(
|
||||||
await ctx.VDODO.methods.balanceOf(account0).call(),
|
// await ctx.VDODO.methods.balanceOf(account0).call(),
|
||||||
decimalStr("0.1")
|
// decimalStr("0.1")
|
||||||
);
|
// );
|
||||||
|
|
||||||
assert.equal(
|
// assert.equal(
|
||||||
await ctx.VDODO.methods.totalSupply().call(),
|
// await ctx.VDODO.methods.totalSupply().call(),
|
||||||
decimalStr("0.1")
|
// decimalStr("0.1")
|
||||||
);
|
// );
|
||||||
assert.notEqual(
|
// assert.notEqual(
|
||||||
await ctx.VDODO.methods.lastRewardBlock().call(),
|
// await ctx.VDODO.methods.lastRewardBlock().call(),
|
||||||
ctx.lastRewardBlock
|
// ctx.lastRewardBlock
|
||||||
);
|
// );
|
||||||
});
|
// });
|
||||||
|
// it("vdodo owner can transfer", async () => {
|
||||||
|
|
||||||
|
// await ctx.VDODO.methods.mint(decimalStr("10"),"0x0000000000000000000000000000000000000000").send(ctx.sendParam(account0))
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.DODO.methods.balanceOf(account0).call(),
|
||||||
|
// decimalStr("990")
|
||||||
|
// );
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.DODO.methods.balanceOf(ctx.VDODO.options.address).call(),
|
||||||
|
// decimalStr("10")
|
||||||
|
// );
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.VDODO.methods.balanceOf(account0).call(),
|
||||||
|
// decimalStr("0.1")
|
||||||
|
// );
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.VDODO.methods.balanceOf(account1).call(),
|
||||||
|
// decimalStr("0")
|
||||||
|
// );
|
||||||
|
|
||||||
|
|
||||||
|
// await truffleAssert.reverts(
|
||||||
|
// ctx.VDODO.methods.transfer(account1,decimalStr("0.1")).send(ctx.sendParam(account0)),
|
||||||
|
// "vDODOToken: not allowed transfer"
|
||||||
|
// )
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.VDODO.methods.balanceOf(account0).call(),
|
||||||
|
// decimalStr("0.1")
|
||||||
|
// );
|
||||||
|
// assert.equal(
|
||||||
|
// await ctx.VDODO.methods.balanceOf(account1).call(),
|
||||||
|
// decimalStr("0")
|
||||||
|
// );
|
||||||
|
|
||||||
|
// });
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ export class VDODOContext {
|
|||||||
|
|
||||||
console.log(log.blueText("[Init VDODO context]"));
|
console.log(log.blueText("[Init VDODO context]"));
|
||||||
|
|
||||||
console.log("alpha = "+ this.alpha);
|
console.log("init alpha = " + this.alpha);
|
||||||
console.log("lastRewardBlock = " + this.lastRewardBlock);
|
console.log("init lastRewardBlock = " + this.lastRewardBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendParam(sender, value = "0") {
|
sendParam(sender, value = "0") {
|
||||||
|
|||||||
Reference in New Issue
Block a user