Skip to content

Commit debff32

Browse files
authored
Update escrow_tests.move
1 parent 75823f3 commit debff32

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

escrow/tests/escrow_tests.move

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ module Escrow::escrow_tests {
77

88
#[test]
99
public entry fun test_happy_flow() {
10-
let mut bw = escrow::new_wallet();
11-
let mut sw = escrow::new_wallet();
10+
let bw = escrow::new_wallet();
11+
let sw = escrow::new_wallet();
1212

1313
escrow::deposit(&mut bw, 150);
14-
let mut d = escrow::create(BUYER, SELLER, 100);
14+
let d = escrow::create(BUYER, SELLER, 100);
1515

1616
escrow::fund(BUYER, &mut bw, &mut d);
1717
escrow::release(SELLER, &mut sw, &mut d);
1818

1919
assert!(escrow::balance(&bw) == 50, 0);
2020
assert!(escrow::balance(&sw) == 100, 1);
2121

22-
// Поглощаем ресурсы (утилиты есть в модуле)
22+
// Поглощаем ресурсы
2323
escrow::destroy_deal_for_test(d);
2424
escrow::destroy_wallet_for_test(bw);
2525
escrow::destroy_wallet_for_test(sw);
@@ -29,10 +29,9 @@ module Escrow::escrow_tests {
2929
#[test]
3030
#[expected_failure(abort_code = 5, location = Escrow::escrow)]
3131
public entry fun test_fund_wrong_buyer_fails() {
32-
let mut bw = escrow::new_wallet();
33-
let mut d = escrow::create(BUYER, SELLER, 10);
32+
let bw = escrow::new_wallet();
33+
let d = escrow::create(BUYER, SELLER, 10);
3434
escrow::deposit(&mut bw, 10);
35-
// wrong buyer:
3635
escrow::fund(@0xDEAD, &mut bw, &mut d);
3736
escrow::destroy_deal_for_test(d);
3837
escrow::destroy_wallet_for_test(bw);
@@ -42,8 +41,8 @@ module Escrow::escrow_tests {
4241
#[test]
4342
#[expected_failure(abort_code = 2, location = Escrow::escrow)]
4443
public entry fun test_release_not_funded_fails() {
45-
let mut sw = escrow::new_wallet();
46-
let mut d = escrow::create(BUYER, SELLER, 10);
44+
let sw = escrow::new_wallet();
45+
let d = escrow::create(BUYER, SELLER, 10);
4746
escrow::release(SELLER, &mut sw, &mut d);
4847
escrow::destroy_deal_for_test(d);
4948
escrow::destroy_wallet_for_test(sw);

0 commit comments

Comments
 (0)