Test call changed to callStatic to avoid unwantend context changes

This commit is contained in:
donosonaumczuk
2022-04-06 12:10:38 +01:00
committed by Alan
parent 6a0b383954
commit 51d0b6a382

View File

@@ -152,13 +152,14 @@ makeSuiteCleanRoom('Profile Follow Module', function () {
lensHub.connect(userTwo).follow([FIRST_PROFILE_ID], [DEFAULT_FOLLOW_DATA])
).to.not.be.reverted;
// Update the revision and follow again
// Update the revision
const data = abiCoder.encode(['uint256'], [1]);
await expect(
lensHub.setFollowModule(FIRST_PROFILE_ID, profileFollowModule.address, data)
).to.not.be.reverted;
// We check that profile can be followed again but through callStatic to avoid state-changes
await expect(
lensHub.connect(userTwo).follow([FIRST_PROFILE_ID], [DEFAULT_FOLLOW_DATA])
lensHub.connect(userTwo).callStatic.follow([FIRST_PROFILE_ID], [DEFAULT_FOLLOW_DATA])
).to.not.be.reverted;
// Return the revision to the original, follow should be invalid