mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-06 13:34:38 -04:00
feat: Add xmr-btc-swap repo in subdirectory
This commit is contained in:
parent
462f3b2e6f
commit
757183e857
526 changed files with 41757 additions and 1 deletions
21
src-xmr-btc-swap/swap/tests/ensure_same_swap_id.rs
Normal file
21
src-xmr-btc-swap/swap/tests/ensure_same_swap_id.rs
Normal file
|
@ -0,0 +1,21 @@
|
|||
pub mod harness;
|
||||
|
||||
use harness::SlowCancelConfig;
|
||||
use swap::protocol::bob;
|
||||
|
||||
#[tokio::test]
|
||||
async fn ensure_same_swap_id_for_alice_and_bob() {
|
||||
harness::setup_test(SlowCancelConfig, |mut ctx| async move {
|
||||
let (bob_swap, _) = ctx.bob_swap().await;
|
||||
let bob_swap_id = bob_swap.id;
|
||||
tokio::spawn(bob::run(bob_swap));
|
||||
|
||||
// once Bob's swap is spawned we can retrieve Alice's swap and assert on the
|
||||
// swap ID
|
||||
let alice_swap = ctx.alice_next_swap().await;
|
||||
assert_eq!(alice_swap.swap_id, bob_swap_id);
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.await;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue