Skip to content

Commit

Permalink
Fix test test_transport_funds_between_chains_if_dst_chain_disallows_a…
Browse files Browse the repository at this point in the history
…fter_message_is_sent

Signed-off-by: linning <[email protected]>
  • Loading branch information
NingLin-P committed Sep 9, 2024
1 parent d9ccd85 commit 0f6f9d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions domains/pallets/messenger/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,8 +986,8 @@ fn test_transport_funds_between_chains_if_dst_chain_disallows_after_message_is_s
let post_transfer_balance = chain_a_test_ext.execute_with(|| {
<chain_a::Balances as Inspect<BalanceOf<chain_a::Runtime>>>::total_balance(&account_id)
});
let fee = 100000002;
assert_eq!(pre_transfer_balance - 500 - fee, post_transfer_balance);
// The transferred fund + relay fee should be deducted
assert!(post_transfer_balance < pre_transfer_balance - 500);

// remove chain_b from allowlist
chain_b_test_ext.execute_with(ChainAllowlist::<chain_b::Runtime>::kill);
Expand Down Expand Up @@ -1035,7 +1035,8 @@ fn test_transport_funds_between_chains_if_dst_chain_disallows_after_message_is_s
let post_response_balance = chain_a_test_ext.execute_with(|| {
<chain_a::Balances as Inspect<BalanceOf<chain_a::Runtime>>>::total_balance(&account_id)
});
assert_eq!(post_response_balance, pre_transfer_balance - fee)
// The transferred fund should be refunded
assert_eq!(post_response_balance, post_transfer_balance + 500)
}

#[test]
Expand Down

0 comments on commit 0f6f9d9

Please sign in to comment.