Problem
The access_control contract functions have minimal test coverage. Role granting, revocation, and multi-role scenarios are entirely untested.
Proposed Solution
Create contracts/cntr/tests/access_control_tests.rs. Write at least 10 unit tests covering: grant role to new address, grant same role twice (idempotent — must not duplicate), grant two different roles to the same address, revoke existing role, revoke non-existent role (must not panic), check role for unknown address, get all roles for multi-role holder, has_role with empty registry. All implementation must live inside contracts/cntr/.
Acceptance Criteria
Problem
The access_control contract functions have minimal test coverage. Role granting, revocation, and multi-role scenarios are entirely untested.
Proposed Solution
Create
contracts/cntr/tests/access_control_tests.rs. Write at least 10 unit tests covering: grant role to new address, grant same role twice (idempotent — must not duplicate), grant two different roles to the same address, revoke existing role, revoke non-existent role (must not panic), check role for unknown address, get all roles for multi-role holder, has_role with empty registry. All implementation must live insidecontracts/cntr/.Acceptance Criteria
contracts/cntr/tests/access_control_tests.rsrole_checker.rspeer modulecargo test