Skip to content

Commit

Permalink
adjust position of event checker
Browse files Browse the repository at this point in the history
  • Loading branch information
JoE11-y committed Oct 2, 2024
1 parent 4282098 commit 32f0935
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/blockchain/starknet/src/tests/bridge_t.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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));
Expand All @@ -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,
Expand Down

0 comments on commit 32f0935

Please sign in to comment.