Skip to content

Commit

Permalink
refactor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
augustbleeds committed Sep 18, 2024
1 parent 35ab68d commit f02d36d
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 425 deletions.
2 changes: 1 addition & 1 deletion contracts/src/mcms.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ mod ManyChainMultiSig {
assert(
group_quorums.len() == NUM_GROUPS.into()
&& group_quorums.len() == group_parents.len(),
'group quorums/parents mismatch'
'wrong group quorums/parents len'
);

let mut group_children_counts: Felt252Dict<u8> = Default::default();
Expand Down
5 changes: 2 additions & 3 deletions contracts/src/tests/test_mcms/test_execute.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,12 @@ fn test_wrong_multisig_address() {
op1.multisig = contract_address_const::<119922>();
let op1_proof = *ops_proof.at(0);

start_cheat_chain_id_global(1231);
let result = safe_mcms.execute(op1, op1_proof);

match result {
Result::Ok(_) => panic!("expect 'wrong chain id'"),
Result::Ok(_) => panic!("expect 'wrong multisig address'"),
Result::Err(panic_data) => {
assert(*panic_data.at(0) == 'wrong chain id', *panic_data.at(0));
assert(*panic_data.at(0) == 'wrong multisig address', *panic_data.at(0));
}
}
}
Expand Down
Loading

0 comments on commit f02d36d

Please sign in to comment.