updates to tests
This commit is contained in:
parent
d308f0200e
commit
eb2e8f6a50
|
@ -197,12 +197,12 @@ contract('StandardBounties', function(accounts) {
|
|||
}
|
||||
}
|
||||
});
|
||||
it("[BOTH] Verifies that I can issue, activate, fulfill many times, accept, and pay out new bounties paying in both ETH and Tokens", async (done) => {
|
||||
it("[BOTH] Verifies that I can issue, activate, fulfill many times, accept, and pay out new bounties paying in both ETH and Tokens", async () => {
|
||||
|
||||
let registry = await StandardBounties.new(accounts[0]);
|
||||
let bountyToken = await HumanStandardToken.new(1000000000, "Bounty Token", 18, "BOUNT", {from: accounts[0]});
|
||||
|
||||
for (var i = 0; i < 100; i++){
|
||||
for (var i = 0; i < 10; i++){
|
||||
if (i % 2){
|
||||
await registry.issueBounty(accounts[0],
|
||||
2528821098,
|
||||
|
@ -216,13 +216,13 @@ contract('StandardBounties', function(accounts) {
|
|||
|
||||
await registry.activateBounty(i,1000, {from: accounts[0]});
|
||||
|
||||
for (var j = 0; j < 10; j++){
|
||||
for (var j = 0; j < 50; j++){
|
||||
await registry.fulfillBounty(i, "data", {from: accounts[1]});
|
||||
var numFul = await registry.getNumFulfillments(i);
|
||||
assert(numFul == (j+1));
|
||||
}
|
||||
|
||||
var random = Math.floor(Math.random() * 9);
|
||||
var random = Math.floor(Math.random() * 49);
|
||||
|
||||
await registry.acceptFulfillment(i,random,{from: accounts[0]});
|
||||
var bounty = await registry.getBounty(i);
|
||||
|
@ -241,24 +241,21 @@ contract('StandardBounties', function(accounts) {
|
|||
|
||||
await registry.activateBounty(i,1000, {from: accounts[0], value: 1000});
|
||||
|
||||
for (var j = 0; j < 10; j++){
|
||||
for (var j = 0; j < 50; j++){
|
||||
await registry.fulfillBounty(i, "data", {from: accounts[1]});
|
||||
var numFul = await registry.getNumFulfillments(i);
|
||||
assert(numFul == (j+1));
|
||||
}
|
||||
|
||||
var random = Math.floor(Math.random() * 9);
|
||||
var random = Math.floor(Math.random() * 49);
|
||||
|
||||
await registry.acceptFulfillment(i,random,{from: accounts[0]});
|
||||
|
||||
var bounty = await registry.getBounty(i);
|
||||
assert(bounty[5] == 0);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}).timeout(10000000000);
|
||||
});
|
||||
|
||||
it("[BOTH] Verifies that I can issue, activate, fulfill, accept, and pay out new bounties paying in both ETH and Tokens from various addresses, with various token contracts", async () => {
|
||||
|
||||
|
|
Loading…
Reference in New Issue