Code coverage for Solidity smart-contracts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
const Wallet = artifacts.require('Wallet');
|
|
|
|
|
|
|
|
contract('Wallet', accounts => {
|
|
|
|
it('should should allow transfers and sends', async () => {
|
|
|
|
const walletA = await Wallet.new();
|
|
|
|
const walletB = await Wallet.new();
|
|
|
|
|
|
|
|
await walletA.sendTransaction({
|
|
|
|
value: web3.utils.toBN(500), from: accounts[0],
|
|
|
|
});
|
|
|
|
|
|
|
|
await walletA.sendPayment(50, walletB.address, {
|
|
|
|
from: accounts[0],
|
|
|
|
});
|
|
|
|
|
|
|
|
await walletA.transferPayment(50, walletB.address, {
|
|
|
|
from: accounts[0],
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|