Guest User

Untitled

a guest
Mar 21st, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. function isValidBuyer(uint256 buyTokenQty, uint256 senderValue) public constant returns (bool)
  2. {
  3. if(!isUserExist(msg.sender))
  4. {
  5. msg.sender.transfer(senderValue); //Refund Ether
  6. return false ;
  7. }
  8. else
  9. {
  10. return true ;
  11. }
  12. }
  13.  
  14. it('TCC001: should check invalid buyer and should return false', async () => {
  15. let tempRes1=await instChain.isValidBuyer(100,1,{from:account2,gas:'220000'});
  16.  
  17. assert.isTrue(!tempRes1);
  18. });
Add Comment
Please, Sign In to add comment