From 32f0935f0a2579cbd40965623065e84e7aba783b Mon Sep 17 00:00:00 2001 From: JoE11-y Date: Wed, 2 Oct 2024 07:51:35 +0100 Subject: [PATCH] adjust position of event checker --- apps/blockchain/starknet/src/tests/bridge_t.cairo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/blockchain/starknet/src/tests/bridge_t.cairo b/apps/blockchain/starknet/src/tests/bridge_t.cairo index 44c91863..0cf22a77 100644 --- a/apps/blockchain/starknet/src/tests/bridge_t.cairo +++ b/apps/blockchain/starknet/src/tests/bridge_t.cairo @@ -697,7 +697,6 @@ mod tests { let collection4 = starknet::contract_address_const::<'collection4'>(); let collection5 = starknet::contract_address_const::<'collection5'>(); - let mut spy = spy_events(SpyOn::One(bridge_address)); start_prank(CheatTarget::One(bridge_address), BRIDGE_ADMIN); bridge.white_list_collection(collection1, true); bridge.white_list_collection(collection2, true); @@ -719,6 +718,8 @@ mod tests { assert!(bridge.is_white_listed(collection4), "Collection1 should be whitelisted"); assert!(bridge.is_white_listed(collection5), "Collection1 should be whitelisted"); + let mut spy = spy_events(SpyOn::One(bridge_address)); + start_prank(CheatTarget::One(bridge_address), BRIDGE_ADMIN); bridge.white_list_collection(collection3, false); stop_prank(CheatTarget::One(bridge_address)); @@ -733,6 +734,7 @@ mod tests { assert!(!bridge.is_white_listed(collection3), "Collection1 should not be whitelisted"); assert!(bridge.is_white_listed(collection4), "Collection1 should be whitelisted"); assert!(bridge.is_white_listed(collection5), "Collection1 should be whitelisted"); + spy.assert_emitted(@array![ ( bridge_address,