Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rachit77 committed Sep 17, 2024
1 parent 9b39a67 commit 4fa3c8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/basic-e2e.bats
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ setup() {
# case 2: Transaction rejected sender attempts to transfer more than they have in their wallet
# Trx will fail pre validation check on the node and will be dropped subsequently from the pool
# without recording it on the chain and hence nonce will not change
local sender_balance=$(rpcQuery "balance" --ether "$senderAddr") || return 1
local sender_balance=$(rpcQuery "balance" "--ether" "$senderAddr") || return 1
local excessive_value=$(echo "$sender_balance + 1" | bc)ether
run sendTx "$private_key" "$receiver" "$excessive_value"
assert_failure "Transaction should fail when attempting to transfer more than the sender's balance"
assert_failure "Transaction should fail when attempting to transfer more than the sender balance"

# check wheather nonce of sender was updated correctly or not
local final_nonce=$(rpcQuery "nonce" "$senderAddr") || return 1
assert_equal "$final_nonce" "$(echo "$initial_nonce + 1" | bc)" "Error: nonce not updated correctly"
assert_equal "$final_nonce" "$(echo "$initial_nonce + 1" | bc)" "Error nonce not updated correctly"
}

@test "Deploy ERC20Mock contract" {
Expand Down

0 comments on commit 4fa3c8f

Please sign in to comment.