mirror of
https://github.com/fluencelabs/lazy-snark
synced 2025-06-11 14:01:26 +00:00
more tests
This commit is contained in:
@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user