mirror of
https://github.com/fluencelabs/lazy-snark
synced 2025-04-25 06:52:14 +00:00
more tests
This commit is contained in:
parent
e3c694f776
commit
97c5d00f82
@ -9,11 +9,14 @@ contract("Testing Lazy", accounts => {
|
|||||||
let tasksNum = await instance.tasksNum.call();
|
let tasksNum = await instance.tasksNum.call();
|
||||||
assert.equal(tasksNum.valueOf(), 2);
|
assert.equal(tasksNum.valueOf(), 2);
|
||||||
});
|
});
|
||||||
it("should verify correct proof", async () => {
|
|
||||||
|
it("should detect incorrect proof", async () => {
|
||||||
let instance = await Lazy.deployed();
|
let instance = await Lazy.deployed();
|
||||||
console.log("let's try to verify");
|
let task = await instance.tasks(0);
|
||||||
let tasksNum = await instance.challenge.call(1);
|
assert.equal(task.status, 0);
|
||||||
console.log("should be ok");
|
await instance.challenge(0);
|
||||||
|
task = await instance.tasks(0);
|
||||||
|
assert.equal(task.status, 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user