fix veto tests
This commit is contained in:
		
							parent
							
								
									6b0083eeb8
								
							
						
					
					
						commit
						42c0782c0e
					
				| @ -231,10 +231,18 @@ contract('Contribution app', (accounts) => { | ||||
| 
 | ||||
|     it("veto contribution", async () => { | ||||
|       const contributionId = await contribution.contributionsCount(); | ||||
|       let contributionObject = await contribution.getContribution(contributionId.toNumber()); | ||||
|       await contribution.veto(contributionId.toNumber(), {from: root}); | ||||
|       // eslint-disable-next-line no-undef
 | ||||
|       assert(contributionObject[9], true); | ||||
|       if(contributionId < 10) { | ||||
|         return assertRevert(async () => { | ||||
|           await contribution.veto(contributionId.toNumber(), {from: root}); | ||||
|           'can not veto first 10 contribution'; | ||||
|         });   | ||||
|       } | ||||
|       else { | ||||
|         await contribution.veto(contributionId.toNumber(), {from: root}); | ||||
|         let contributionObject = await contribution.getContribution(contributionId.toNumber()); | ||||
|         // eslint-disable-next-line no-undef
 | ||||
|         assert(contributionObject[9], true);   | ||||
|       } | ||||
|     }); | ||||
|   }); | ||||
| 
 | ||||
| @ -277,9 +285,8 @@ contract('Contribution app', (accounts) => { | ||||
|       } | ||||
|       await mineBlock(); | ||||
| 
 | ||||
|       let contributionObject = await contribution.getContribution(contributionId.toNumber()); | ||||
| 
 | ||||
|       await contribution.claim(contributionId); | ||||
|       let contributionObject = await contribution.getContribution(contributionId.toNumber()); | ||||
|       // eslint-disable-next-line no-undef
 | ||||
|       assert(contributionObject[3], true); | ||||
|     }); | ||||
|  | ||||
| @ -44,6 +44,7 @@ | ||||
|   "devDependencies": { | ||||
|     "@aragon/kits-base": "^1.0.0", | ||||
|     "@aragon/os": "^4.2.0", | ||||
|     "@aragon/test-helpers": "^2.0.0", | ||||
|     "async-each-series": "^1.1.0", | ||||
|     "cli-table": "^0.3.1", | ||||
|     "eslint": "^5.16.0", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user