Skip to content

Commit

Permalink
Already had these tests!
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed Nov 6, 2024
1 parent f0d0acd commit 3992445
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
19 changes: 1 addition & 18 deletions test/Azorius-LinearERC20VotingWithHatsProposalCreation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ describe('LinearERC20VotingWithHatsProposalCreation', () => {
// Wallets
let deployer: SignerWithAddress;
let gnosisSafeOwner: SignerWithAddress;
let rando: SignerWithAddress;

// Gnosis
let createGnosisSetupCalldata: string;
Expand All @@ -59,7 +58,7 @@ describe('LinearERC20VotingWithHatsProposalCreation', () => {

const abiCoder = new ethers.AbiCoder();

[deployer, gnosisSafeOwner, rando] = await hre.ethers.getSigners();
[deployer, gnosisSafeOwner] = await hre.ethers.getSigners();

createGnosisSetupCalldata =
// eslint-disable-next-line camelcase
Expand Down Expand Up @@ -247,22 +246,6 @@ describe('LinearERC20VotingWithHatsProposalCreation', () => {
);
});

it('Non-owner cannot whitelist a hat', async () => {
const hatId = 1; // Example hat ID

await expect(linearERC20VotingWithHats.connect(rando).whitelistHat(hatId)).to.be.revertedWith(
'Ownable: caller is not the owner',
);
});

it('Non-owner cannot remove a hat from the whitelist', async () => {
const hatId = 1; // Example hat ID

await expect(
linearERC20VotingWithHats.connect(rando).removeHatFromWhitelist(hatId),
).to.be.revertedWith('Ownable: caller is not the owner');
});

it('Cannot call setUp function again', async () => {
const setupParams = ethers.AbiCoder.defaultAbiCoder().encode(
['address', 'address', 'address', 'uint32', 'uint256', 'uint256', 'address', 'uint256[]'],
Expand Down
19 changes: 1 addition & 18 deletions test/Azorius-LinearERC721VotingWithHatsProposalCreation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ describe('LinearERC721VotingWithHatsProposalCreation', () => {
// Wallets
let deployer: SignerWithAddress;
let gnosisSafeOwner: SignerWithAddress;
let rando: SignerWithAddress;

// Gnosis
let createGnosisSetupCalldata: string;
Expand All @@ -58,7 +57,7 @@ describe('LinearERC721VotingWithHatsProposalCreation', () => {

const abiCoder = new ethers.AbiCoder();

[deployer, gnosisSafeOwner, rando] = await hre.ethers.getSigners();
[deployer, gnosisSafeOwner] = await hre.ethers.getSigners();

createGnosisSetupCalldata =
// eslint-disable-next-line camelcase
Expand Down Expand Up @@ -229,22 +228,6 @@ describe('LinearERC721VotingWithHatsProposalCreation', () => {
);
});

it('Non-owner cannot whitelist a hat', async () => {
const hatId = 1; // Example hat ID

await expect(linearERC721VotingWithHats.connect(rando).whitelistHat(hatId)).to.be.revertedWith(
'Ownable: caller is not the owner',
);
});

it('Non-owner cannot remove a hat from the whitelist', async () => {
const hatId = 1; // Example hat ID

await expect(
linearERC721VotingWithHats.connect(rando).removeHatFromWhitelist(hatId),
).to.be.revertedWith('Ownable: caller is not the owner');
});

it('Cannot call setUp function again', async () => {
const setupParams = ethers.AbiCoder.defaultAbiCoder().encode(
[
Expand Down

0 comments on commit 3992445

Please sign in to comment.