Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzschoff committed Aug 11, 2023
1 parent f22bf46 commit b34587f
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ethers } from 'ethers';
import { bootstrapWithMockMarketAndPool } from '../../bootstrap';
import { verifyUsesFeatureFlag } from '../../verifications';

describe('PoolModule Create / Ownership', function () {
describe.only('PoolModule Create / Ownership', function () {

Check failure on line 10 in protocol/synthetix/test/integration/modules/core/PoolModuleOwnership.test.ts

View workflow job for this annotation

GitHub Actions / lint

describe.only not permitted
const { signers, systems, MockMarket, marketId, poolId, depositAmount } =
bootstrapWithMockMarketAndPool();

Expand Down Expand Up @@ -75,7 +75,7 @@ describe('PoolModule Create / Ownership', function () {
});
});

describe('when transfering to a new owner', async () => {
describe('when transferring to a new owner', async () => {
describe('when attempting to accept before nominating', async () => {
it('reverts', async () => {
await assertRevert(
Expand Down Expand Up @@ -196,6 +196,27 @@ describe('PoolModule Create / Ownership', function () {
});
});
});

describe('when owner renouncing his ownership', async () => {
it('fails when not the owner tries to renounce it', async () => {
await assertRevert(
systems().Core.connect(user2).renouncePoolOwnership(2),
`Unauthorized("${await user2.getAddress()}")`,
systems().Core
);
});
it('emits and event', async () => {
await assertEvent(
await systems().Core.connect(user1).renouncePoolOwnership(2),
`PoolOwnershipRenounced(2, "${await user1.getAddress()}")`,
systems().Core
);
});
it('pool has no owner', async () => {
await systems().Core.getPoolOwner(2);
assert.equal(await systems().Core.getPoolOwner(2), ethers.constants.AddressZero);
});
});
});
});

Expand Down

0 comments on commit b34587f

Please sign in to comment.