Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
barrasso committed Jan 14, 2022
1 parent d77c928 commit 8e9bcf0
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions test/contracts/FeePool.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,6 @@ contract('FeePool', async accounts => {
});

describe('restricted methods', () => {
it('appendAccountIssuanceRecord() cannot be invoked directly by any account', async () => {
await onlyGivenAddressCanInvoke({
fnc: feePool.appendAccountIssuanceRecord,
accounts,
args: [account1, toUnit('0.001'), '0'],
reason: 'Issuer and SynthetixState only',
});
});
});

describe('setRewardsToDistribute', () => {
before(async () => {
await proxyThruTo({
proxy: feePoolProxy,
Expand All @@ -216,11 +205,21 @@ contract('FeePool', async accounts => {
args: [rewardsDistribution.address],
});
});
it('should revert when called by an unauthorized account', async () => {
await assert.revert(
feePool.setRewardsToDistribute('0', { from: account1 }),
'RewardsDistribution only'
);
it('setRewardsToDistribute() cannot be called by an unauthorized account', async () => {
await onlyGivenAddressCanInvoke({
fnc: feePool.setRewardsToDistribute,
accounts,
args: ['0'],
reason: 'RewardsDistribution only',
});
});
it('appendAccountIssuanceRecord() cannot be invoked directly by any account', async () => {
await onlyGivenAddressCanInvoke({
fnc: feePool.appendAccountIssuanceRecord,
accounts,
args: [account1, toUnit('0.001'), '0'],
reason: 'Issuer and SynthetixState only',
});
});
});

Expand Down

0 comments on commit 8e9bcf0

Please sign in to comment.