Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelAR committed Nov 15, 2024
1 parent 167a2c1 commit f5504b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/src/donatorManager.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub mod DonatorManager {
call_data.append(get_caller_address().try_into().unwrap());

let (new_donator_address, _) = deploy_syscall(
self.donator_class_hash.read(), 12345,call_data.span(), false
self.donator_class_hash.read(), 12345, call_data.span(), false
)
.unwrap();
self.donators.write(get_caller_address().try_into().unwrap(), new_donator_address);
Expand Down
6 changes: 3 additions & 3 deletions contracts/tests/test_fund.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ fn test_update_received_donation() {
let token_dispatcher = IERC20Dispatcher { contract_address: token_address };

start_cheat_caller_address(contract_address, VALID_ADDRESS_1());
dispatcher.setState(2);
dispatcher.set_state(2);

start_cheat_caller_address(contract_address, FUND_MANAGER());
dispatcher.setGoal(strks);
dispatcher.set_goal(strks);

start_cheat_caller_address(token_address, minter_address);
let mut calldata = array![];
Expand All @@ -366,7 +366,7 @@ fn test_update_received_donation() {

let current_balance = dispatcher.get_current_goal_state();

assert(dispatcher.getState() == FundStates::CLOSED, 'state is not closed');
assert(dispatcher.get_state() == FundStates::CLOSED, 'state is not closed');
assert(current_balance == strks, 'strks not reached');

spy
Expand Down

0 comments on commit f5504b7

Please sign in to comment.