Update all dependencies transitively (#2363)

This commit is contained in:
Francisco Giordano
2020-09-16 12:14:53 -03:00
committed by GitHub
parent bf4c9d700d
commit ace35fdeda
45 changed files with 6937 additions and 8793 deletions

View File

@ -18,31 +18,31 @@ describe('PaymentSplitter', function () {
it('rejects more payees than shares', async function () {
await expectRevert(PaymentSplitter.new([payee1, payee2, payee3], [20, 30]),
'PaymentSplitter: payees and shares length mismatch'
'PaymentSplitter: payees and shares length mismatch',
);
});
it('rejects more shares than payees', async function () {
await expectRevert(PaymentSplitter.new([payee1, payee2], [20, 30, 40]),
'PaymentSplitter: payees and shares length mismatch'
'PaymentSplitter: payees and shares length mismatch',
);
});
it('rejects null payees', async function () {
await expectRevert(PaymentSplitter.new([payee1, ZERO_ADDRESS], [20, 30]),
'PaymentSplitter: account is the zero address'
'PaymentSplitter: account is the zero address',
);
});
it('rejects zero-valued shares', async function () {
await expectRevert(PaymentSplitter.new([payee1, payee2], [20, 0]),
'PaymentSplitter: shares are 0'
'PaymentSplitter: shares are 0',
);
});
it('rejects repeated payees', async function () {
await expectRevert(PaymentSplitter.new([payee1, payee1], [20, 30]),
'PaymentSplitter: account already has shares'
'PaymentSplitter: account already has shares',
);
});
@ -84,13 +84,13 @@ describe('PaymentSplitter', function () {
describe('release', async function () {
it('reverts if no funds to claim', async function () {
await expectRevert(this.contract.release(payee1),
'PaymentSplitter: account is not due payment'
'PaymentSplitter: account is not due payment',
);
});
it('reverts if non-payee want to claim', async function () {
await send.ether(payer1, this.contract.address, amount);
await expectRevert(this.contract.release(nonpayee1),
'PaymentSplitter: account has no shares'
'PaymentSplitter: account has no shares',
);
});
});

View File

@ -31,7 +31,7 @@ describe('ConditionalEscrow', function () {
await this.escrow.deposit(payee, { from: owner, value: amount });
await expectRevert(this.escrow.withdraw(payee, { from: owner }),
'ConditionalEscrow: payee is not allowed to withdraw'
'ConditionalEscrow: payee is not allowed to withdraw',
);
});
});

View File

@ -21,7 +21,7 @@ function shouldBehaveLikeEscrow (owner, [payee1, payee2]) {
it('only the owner can deposit', async function () {
await expectRevert(this.escrow.deposit(payee1, { from: payee2 }),
'Ownable: caller is not the owner'
'Ownable: caller is not the owner',
);
});
@ -73,7 +73,7 @@ function shouldBehaveLikeEscrow (owner, [payee1, payee2]) {
it('only the owner can withdraw', async function () {
await expectRevert(this.escrow.withdraw(payee1, { from: payee1 }),
'Ownable: caller is not the owner'
'Ownable: caller is not the owner',
);
});

View File

@ -15,7 +15,7 @@ describe('RefundEscrow', function () {
it('requires a non-null beneficiary', async function () {
await expectRevert(
RefundEscrow.new(ZERO_ADDRESS, { from: owner }), 'RefundEscrow: beneficiary is the zero address'
RefundEscrow.new(ZERO_ADDRESS, { from: owner }), 'RefundEscrow: beneficiary is the zero address',
);
});
@ -39,21 +39,21 @@ describe('RefundEscrow', function () {
it('does not refund refundees', async function () {
await this.escrow.deposit(refundee1, { from: owner, value: amount });
await expectRevert(this.escrow.withdraw(refundee1),
'ConditionalEscrow: payee is not allowed to withdraw'
'ConditionalEscrow: payee is not allowed to withdraw',
);
});
it('does not allow beneficiary withdrawal', async function () {
await this.escrow.deposit(refundee1, { from: owner, value: amount });
await expectRevert(this.escrow.beneficiaryWithdraw(),
'RefundEscrow: beneficiary can only withdraw while closed'
'RefundEscrow: beneficiary can only withdraw while closed',
);
});
});
it('only the owner can enter closed state', async function () {
await expectRevert(this.escrow.close({ from: beneficiary }),
'Ownable: caller is not the owner'
'Ownable: caller is not the owner',
);
const { logs } = await this.escrow.close({ from: owner });
@ -69,13 +69,13 @@ describe('RefundEscrow', function () {
it('rejects deposits', async function () {
await expectRevert(this.escrow.deposit(refundee1, { from: owner, value: amount }),
'RefundEscrow: can only deposit while active'
'RefundEscrow: can only deposit while active',
);
});
it('does not refund refundees', async function () {
await expectRevert(this.escrow.withdraw(refundee1),
'ConditionalEscrow: payee is not allowed to withdraw'
'ConditionalEscrow: payee is not allowed to withdraw',
);
});
@ -87,20 +87,20 @@ describe('RefundEscrow', function () {
it('prevents entering the refund state', async function () {
await expectRevert(this.escrow.enableRefunds({ from: owner }),
'RefundEscrow: can only enable refunds while active'
'RefundEscrow: can only enable refunds while active',
);
});
it('prevents re-entering the closed state', async function () {
await expectRevert(this.escrow.close({ from: owner }),
'RefundEscrow: can only close while active'
'RefundEscrow: can only close while active',
);
});
});
it('only the owner can enter refund state', async function () {
await expectRevert(this.escrow.enableRefunds({ from: beneficiary }),
'Ownable: caller is not the owner'
'Ownable: caller is not the owner',
);
const { logs } = await this.escrow.enableRefunds({ from: owner });
@ -116,7 +116,7 @@ describe('RefundEscrow', function () {
it('rejects deposits', async function () {
await expectRevert(this.escrow.deposit(refundee1, { from: owner, value: amount }),
'RefundEscrow: can only deposit while active'
'RefundEscrow: can only deposit while active',
);
});
@ -130,19 +130,19 @@ describe('RefundEscrow', function () {
it('does not allow beneficiary withdrawal', async function () {
await expectRevert(this.escrow.beneficiaryWithdraw(),
'RefundEscrow: beneficiary can only withdraw while closed'
'RefundEscrow: beneficiary can only withdraw while closed',
);
});
it('prevents entering the closed state', async function () {
await expectRevert(this.escrow.close({ from: owner }),
'RefundEscrow: can only close while active'
'RefundEscrow: can only close while active',
);
});
it('prevents re-entering the refund state', async function () {
await expectRevert(this.escrow.enableRefunds({ from: owner }),
'RefundEscrow: can only enable refunds while active'
'RefundEscrow: can only enable refunds while active',
);
});
});