mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-01 11:06:13 -04:00
WIP - Add highter order function for test init to solve lifetime issues of cli
This commit is contained in:
parent
9a260df97d
commit
8708d27603
2 changed files with 29 additions and 15 deletions
|
@ -8,14 +8,10 @@ pub mod testutils;
|
|||
|
||||
#[tokio::test]
|
||||
async fn happy_path() {
|
||||
let mut test = Test::new(
|
||||
bitcoin::Amount::from_sat(1_000_000),
|
||||
monero::Amount::from_piconero(1_000_000_000_000),
|
||||
)
|
||||
.await;
|
||||
testutils::test(|alice, bob| async move {
|
||||
join!(alice.swap(), bob.swap());
|
||||
|
||||
join!(test.alice.swap(), test.bob.swap());
|
||||
|
||||
test.alice.assert_btc_redeemed();
|
||||
test.bob.assert_btc_redeemed();
|
||||
alice.assert_btc_redeemed();
|
||||
bob.assert_btc_redeemed();
|
||||
}).await;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue