Skip to content

Commit a428111

Browse files
committed
Remove accidental duplicate test
1 parent aa17913 commit a428111

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

programs/escrow/src/tests.rs

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,37 +37,14 @@ fn test_make_offer_succeeds() {
3737
make_offer_accounts,
3838
);
3939

40-
send_transaction_from_instructions(
40+
let result = send_transaction_from_instructions(
4141
&mut test_environment.litesvm,
4242
vec![make_offer_instruction],
4343
&[&test_environment.alice],
4444
&test_environment.alice.pubkey(),
45-
)
46-
.unwrap();
47-
48-
let make_offer_accounts_with_existing_offer_id = build_make_offer_accounts(
49-
test_environment.bob.pubkey(),
50-
test_environment.token_mint_a.pubkey(),
51-
test_environment.token_mint_b.pubkey(),
52-
test_environment.bob_token_account_a,
53-
offer_account,
54-
vault,
55-
);
56-
57-
let make_offer_instruction_with_existing_offer_id = build_make_offer_instruction(
58-
offer_id,
59-
1 * TOKEN_A,
60-
1 * TOKEN_B,
61-
make_offer_accounts_with_existing_offer_id,
62-
);
63-
64-
let result = send_transaction_from_instructions(
65-
&mut test_environment.litesvm,
66-
vec![make_offer_instruction_with_existing_offer_id],
67-
&[&test_environment.bob],
68-
&test_environment.bob.pubkey(),
6945
);
70-
assert!(result.is_err(), "Second offer with same ID should fail");
46+
47+
assert!(result.is_ok(), "Valid offer should succeed");
7148
}
7249

7350
#[test]

0 commit comments

Comments
 (0)