@@ -45,6 +45,15 @@ const setup = async function (accounts,
4545} ;
4646
4747contract ( 'LockingToken4Reputation' , accounts => {
48+ it ( "get earned reputation" , async ( ) => {
49+ let testSetup = await setup ( accounts ) ;
50+ await testSetup . lockingToken4Reputation . lock ( web3 . utils . toWei ( '1' , "ether" ) , 100 , testSetup . lockingToken . address ) ;
51+ await helpers . increaseTime ( 3001 ) ;
52+ const reputation = await testSetup . lockingToken4Reputation . redeem . call ( accounts [ 0 ] ) ;
53+ assert . equal ( reputation , 100 ) ;
54+ assert . equal ( await testSetup . org . reputation . balanceOf ( accounts [ 0 ] ) , 1000 ) ;
55+ } ) ;
56+
4857 it ( "initialize" , async ( ) => {
4958 let testSetup = await setup ( accounts ) ;
5059 assert . equal ( await testSetup . lockingToken4Reputation . reputationReward ( ) , 100 ) ;
@@ -325,4 +334,13 @@ contract('LockingToken4Reputation', accounts => {
325334 6000 ,
326335 accounts [ 1 ] ) ;
327336 } ) ;
337+
338+ it ( "get earned reputation" , async ( ) => {
339+ let testSetup = await setup ( accounts ) ;
340+ await testSetup . lockingToken4Reputation . lock ( web3 . utils . toWei ( '1' , "ether" ) , 100 , testSetup . lockingToken . address ) ;
341+ await helpers . increaseTime ( 3001 ) ;
342+ const reputation = await testSetup . lockingToken4Reputation . redeem . call ( accounts [ 0 ] ) ;
343+ assert . equal ( reputation , 100 ) ;
344+ assert . equal ( await testSetup . org . reputation . balanceOf ( accounts [ 0 ] ) , 1000 ) ;
345+ } ) ;
328346} ) ;
0 commit comments