feat: Avoid self-following

This commit is contained in:
donosonaumczuk
2023-01-09 22:47:59 -03:00
parent d720c13847
commit ded7f35f5a
3 changed files with 18 additions and 0 deletions

View File

@@ -199,6 +199,19 @@ contract FollowTest is BaseTest, AssumptionHelpers {
});
}
function testCannotSelfFollow() public {
vm.expectRevert(Errors.SelfFollow.selector);
_follow({
pk: targetProfileOwnerPk,
isFollowerProfileOwner: true,
followerProfileId: targetProfileId,
idsOfProfilesToFollow: _toUint256Array(targetProfileId),
followTokenIds: _toUint256Array(MINT_NEW_TOKEN),
datas: _toBytesArray('')
});
}
// Positives
function testFollowAsFollowerOwner() public {