# Enzyme protocol tests ###### tags: `CodeRead` # persistent ## shares-splitter ### SharesSplitterFactory.test.ts - does not allow unequal arrays - test deploy function - works as expected ### SharesSplitterProxy.test.ts - init - cannot be called by a random caller - Unauthorized - redeemShares - does not allow a call without a claimable amount of shares - No shares claimed - works as expected (v4: in-kind redemption) - works as expected (v4: specific-assets redemption) ### TreasurySplitterMixin.test.ts - __setSplitRatio - does not allow empty user - does not allow duplicate user - does not allow a bad split ratio - works as expected - claimTokenAmountTo - does not allow an amount greater than claimable - works as expected (partial claim) - Walkthrough - works with multiple claims and token top-ups ## others ### AddressListRegistry.test.ts - constructor - sets state vars - addToList - does not allow a random caller - allows a list owned by Dispatcher to be updated by Dispatcher owner - does not allow UpdateType.None - does not allow UpdateType.RemoveOnly - happy path: UpdateType.AddOnly - happy path: UpdateType.AddAndRemove - createList - happy path - removeFromList - does not allow a random caller - does not allow UpdateType.None - does not allow UpdateType.AddOnly - happy path: UpdateType.RemoveOnly - happy path: UpdateType.AddAndRemove - setListOwner - does not allow a random caller - happy path - setListUpdateType - list search - check if work - steps - Define lists - Create lists - Single item, multiple lists - isInAllLists() - isInSomeOfLists() - Multiple items, multiple lists - areAllInAllLists() - areAllInSomeOfLists - areAllNotInAnyOfLists ### Dispatcher.test.ts - function - ensureFundDeployer - deployVault - signalMigration - constructor - sets initial state - setNominatedOwner - can only be called by the contract owner - does not allow an empty next owner address - does not allow the next owner to be the current owner - does not allow the next owner to already be nominated - correctly handles nominating a new owner - removeNominatedOwner - can only be called by the contract owner - correctly handles removing the nomination - claimOwnership - can only be called by the nominatedOwner - correctly handles transferring ownership - deployVaultProxy - does not allow a bad VaultLib - does not allow a non-contract _vaultAccessor - does not allow a non-contract _vaultAccessor - signalMigration - can only be called by the current fund deployer - does not allow a non-contract _vaultAccessor - does not allow non-existent VaultProxy - cannot be called if fund is already on the current FundDeployer - correctly handles MigrationOutHook.PreSignal failure - correctly signals a migration - cancelMigration - does not allow non-existent migration request - can not be called by an account other the vaultProxy owner or migrator, or the FundDeployer in the migration request - correctly cancels a migration request - executeMigration - does not allow a bad vaultLib - does not allow non-existent migration request - can only be called by the target FundDeployer in the migration request - cannot be called when the target FundDeployer in the migration request is no longer the current FundDeployer - cannot be called when the migration timelock has not yet been met - correctly executes a migration request - setMigrationTimelock - can only be called by the contract owner - does not allow the current migrationTimelock value - correctly handles setting a new migration timelock - correctly handles setting a new migration timelock - returns 0 if - vaultProxy is not valid - vaultProxy does not have a signaled migration - block timestamp >= executableTimestamp - returns the remaining time if block timestamp < executableTimestamp - hasExecutableMigrationRequest - returns false if - vaultProxy is not valid - no migration has been signaled - elapsedTime < migrationTimelock - returns true if elapsedTime >= migrationTimelock - setCurrentFundDeployer - disallows - calling with account other than owner - empty address as nextFundDeployer - nextFundDeployer can't be the same as currentFundDeployer - does not allow _nextFundDeployer to be a non-contract - correctly sets new current fund deployer and emits CurrentFundDeployerSet event - setSharesTokenSymbol - disallows a call by a random user - correctly updates the SharesTokenSymbol and emits event ### GlobalConfig.test.ts ### AddressListRegistry.test.ts ### Dispatcher.test.ts ### GlobalConfig.test.ts # release