Skip to content

Commit

Permalink
fix #23
Browse files Browse the repository at this point in the history
  • Loading branch information
zuies committed Jun 6, 2024
1 parent 94f74cf commit 12570b3
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions test/engagements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("Engage", function () {
// and reset Hardhat Network to that snapshot in every test.
async function deployFixture() {
// Contracts are deployed using the first signer/account by default
const [deployer, provider, otherAccount, otherAccount2] =
const [deployer, provider, otherAccount] =
await hre.viem.getWalletClients();

const contract = await hre.viem.deployContract("EngagementContract");
Expand All @@ -35,7 +35,6 @@ describe("Engage", function () {
deployer,
provider,
otherAccount,
otherAccount2,
publicClient,
};
}
Expand Down Expand Up @@ -138,13 +137,11 @@ describe("Engage", function () {
let tokenId: any;
let contract: any;
let otherAccount: any;
let otherAccount2: any;

beforeEach(async function () {
const fixture = await loadFixture(deployFixture);
contract = fixture.contract;
otherAccount = fixture.otherAccount;
otherAccount2 = fixture.otherAccount2;

tokenId = await contract.read.counter();
await contract.write.issue([hash]);
Expand Down Expand Up @@ -287,12 +284,11 @@ describe("Engage", function () {
describe("Revert", async function () {
it("Should revert with NotAllowed (msg.sender != account)", async function () {
await expect(
contract.write.burn(
[getAddress(otherAccount.account.address), tokenId, amount],
{
account: otherAccount2.account.address,
}
)
contract.write.burn([
getAddress(otherAccount.account.address),
tokenId,
amount,
])
).to.be.rejectedWith(
`NotAllowed("${getAddress(
otherAccount.account.address
Expand Down

0 comments on commit 12570b3

Please sign in to comment.