mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-18 04:14:32 -05:00
acdba8474b
some of the dependency updates are requiring a higher version of the rust toolchain. bump to 1.67 and fix new clippy lints. also fix dprint to 0.39.1 because 0.40 has breaking changes.
22 lines
586 B
Rust
22 lines
586 B
Rust
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;
|
|
}
|