mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-06 23:33:12 +00:00
vault: test lock state transitions
This commit is contained in:
parent
e3291ed82e
commit
1259c2fe71
@ -506,9 +506,10 @@ describe("Vault", function () {
|
|||||||
await vault.transfer(fund, account.address, account2.address, 10)
|
await vault.transfer(fund, account.address, account2.address, 10)
|
||||||
await vault.transfer(fund, account.address, account3.address, 10)
|
await vault.transfer(fund, account.address, account3.address, 10)
|
||||||
await vault.burnAll(fund)
|
await vault.burnAll(fund)
|
||||||
await expect(await vault.getBalance(fund, account.address)).to.equal(0)
|
expect(await vault.getLockStatus(fund)).to.equal(LockStatus.Burned)
|
||||||
await expect(await vault.getBalance(fund, account2.address)).to.equal(0)
|
expect(await vault.getBalance(fund, account.address)).to.equal(0)
|
||||||
await expect(await vault.getBalance(fund, account3.address)).to.equal(0)
|
expect(await vault.getBalance(fund, account2.address)).to.equal(0)
|
||||||
|
expect(await vault.getBalance(fund, account3.address)).to.equal(0)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("moves all tokens in the fund to address 0xdead", async function () {
|
it("moves all tokens in the fund to address 0xdead", async function () {
|
||||||
@ -566,6 +567,14 @@ describe("Vault", function () {
|
|||||||
await setNextBlockTimestamp(expiry)
|
await setNextBlockTimestamp(expiry)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
it("unlocks the funds", async function () {
|
||||||
|
await mine()
|
||||||
|
expect(await vault.getLockStatus(fund)).to.equal(LockStatus.Locked)
|
||||||
|
await expire()
|
||||||
|
await mine()
|
||||||
|
expect(await vault.getLockStatus(fund)).to.equal(LockStatus.Unlocked)
|
||||||
|
})
|
||||||
|
|
||||||
describe("locking", function () {
|
describe("locking", function () {
|
||||||
beforeEach(async function () {
|
beforeEach(async function () {
|
||||||
await setAutomine(true)
|
await setAutomine(true)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user