This commit is contained in:
patrini32 2024-06-28 16:59:26 +00:00 committed by GitHub
parent 532831ee79
commit 7f80851c4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,8 +85,13 @@ async fn alice_manually_punishes_after_bob_dead_and_bob_cancels() {
.await;
assert!(matches!(bob_swap.state, BobState::BtcCancelled { .. }));
// Alice punished Bob, so he should be in the BtcPunished state.
let state = cli::refund(bob_swap_id, bob_swap.bitcoin_wallet, bob_swap.db).await?;
ctx.assert_bob_punished(state).await;
let error = cli::refund(bob_swap_id, bob_swap.bitcoin_wallet, bob_swap.db)
.await
.unwrap_err();
assert_eq!(
&error,
"Cannot refund swap because we have already been punished"
);
Ok(())
})
.await;