test: Misc NFT Transfer Emitters (T-1397)

This commit is contained in:
vicnaum
2023-01-05 12:20:45 +01:00
parent 6b83d235f2
commit c52ffc55f6
2 changed files with 19 additions and 2 deletions

View File

@@ -201,7 +201,9 @@ Negatives
[X] TestWallet should fail to set default profile with sig with signature deadline mismatch
[X] TestWallet should fail to set default profile with sig with invalid deadline
[X] TestWallet should fail to set default profile with sig with invalid nonce
<!-- Already tested in invalid nonce test above -->
[-] TestWallet should sign attempt to set default profile with sig, cancel with empty permitForAll, then fail to set default profile with sig
Scenarios
[X] TestWallet should set the default profile with sig
@@ -412,8 +414,8 @@ Module Globals Governance
Misc
NFT Transfer Emitters
[ ] User should not be able to call the follow NFT transfer event emitter function
[ ] User should not be able to call the collect NFT transfer event emitter function
[X] User should not be able to call the follow NFT transfer event emitter function
[X] User should not be able to call the collect NFT transfer event emitter function
Lens Hub Misc
[ ] UserTwo should fail to burn profile owned by user without being approved
[ ] User should burn profile owned by user

View File

@@ -4,6 +4,21 @@ pragma solidity ^0.8.13;
import './base/BaseTest.t.sol';
import '../../contracts/mocks/MockFollowModule.sol';
// Original Misc
contract NFTTransferEmittersTest is BaseTest {
// Negatives
function testCannotEmitFollowNFTTransferEvent() public {
vm.expectRevert(Errors.CallerNotFollowNFT.selector);
hub.emitFollowNFTTransferEvent(newProfileId, 1, profileOwner, otherSigner);
}
function testCannotEmitCollectNFTTransferEvent() public {
vm.expectRevert(Errors.CallerNotCollectNFT.selector);
hub.emitCollectNFTTransferEvent(newProfileId, 1, 1, profileOwner, otherSigner);
}
}
// New Misc
contract MiscTest is BaseTest {
// Negatives
function testSetDefaultProfileNotExecutorFails() public {