From 51d0b6a38241afe2cd5f440b626d71bcbe1e075d Mon Sep 17 00:00:00 2001 From: donosonaumczuk Date: Wed, 6 Apr 2022 12:10:38 +0100 Subject: [PATCH] Test call changed to callStatic to avoid unwantend context changes --- test/modules/follow/profile-follow-module.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/modules/follow/profile-follow-module.spec.ts b/test/modules/follow/profile-follow-module.spec.ts index 34434c8..796739d 100644 --- a/test/modules/follow/profile-follow-module.spec.ts +++ b/test/modules/follow/profile-follow-module.spec.ts @@ -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