Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating .tree file in adminable_unit_test #634

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions test/unit/concrete/adminable/transfer-admin/transferAdmin.tree
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
transferAdmin.t.sol
├── when the caller is not the admin
│ └── it should revert
└── when the caller is the admin
├── when the admin is the same as the current admin
│ ├── it should re-set the admin
│ └── it should emit a {TransferAdmin} event
└── when the admin is not the same as the current admin
├── when the admin is the zero address
│ ├── it should set the admin to the zero address
│ └── it should emit a {TransferAdmin}
└── when the admin is not the zero address
├── it should set the new admin
└── it should emit a {TransferAdmin} event and set the new admin
Scenario: Transfer ownership from one admin to another

├── Given the caller is not the admin
│ ├── When trying to transfer ownership(from old admin to new one)
│ └── Then it should revert
└── Given the caller is the admin
├── Given the admin(new) is the same as the current admin (actual)
│ └── When the admin transfers ownership to a new admin
│ ├── Then it should re-set the admin
│ └── And the {TransferAdmin} event should be emitted
└── Given the admin(new) is not the same as the current admin(actual)
├── And the admin(new) is the zero address (who deploys the contract)
│ ├── Then it should set the admin to the zero address
│ └── And it should emit a {TransferAdmin}
└── And the admin is not the zero address
├── Then it sets the new admin
└── And it should emit a {TransferAdmin} event and set the new admin