From fa028ebc01ca22f08505ef272b21abf6e6bf85c4 Mon Sep 17 00:00:00 2001 From: Oba Date: Mon, 25 Nov 2024 15:02:49 +0100 Subject: [PATCH] test: use assert macro --- cairo/protocol_handler/tests/test_protocol_handler.cairo | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cairo/protocol_handler/tests/test_protocol_handler.cairo b/cairo/protocol_handler/tests/test_protocol_handler.cairo index 1bb6e97b9..f63abf8a4 100644 --- a/cairo/protocol_handler/tests/test_protocol_handler.cairo +++ b/cairo/protocol_handler/tests/test_protocol_handler.cairo @@ -656,13 +656,11 @@ fn test_protocol_handler_change_operator_should_pass() { let access_control_dispatcher = IAccessControlDispatcher { contract_address: protocol_handler.contract_address }; - assert( + assert!( !access_control_dispatcher.has_role(ProtocolHandler::OPERATOR_ROLE, operator_mock()), - 'Old operator not revoked' ); - assert( + assert!( access_control_dispatcher.has_role(ProtocolHandler::OPERATOR_ROLE, new_operator), - 'New operator not granted' ); // Check the Access control related events are emitted @@ -688,7 +686,7 @@ fn test_protocol_handler_change_operator_should_pass() { // Check the new operator is set in the contract state let loaded = load(protocol_handler.contract_address, selector!("operator"), 1); - assert_eq!(*loaded[0], new_operator.into(), "New operator not set"); + assert_eq!(*loaded[0], new_operator.into()); }