Skip to content

Commit 4065bc8

Browse files
committed
test(wallet): assert Display for InvalidCurrentHeight error
1 parent 3b457b3 commit 4065bc8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/wallet.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,11 @@ fn test_create_tx_invalid_current_height_returns_error() {
322322
.add_recipient(addr.script_pubkey(), Amount::from_sat(25_000))
323323
.current_height(500_000_000);
324324

325-
assert_matches!(
326-
builder.finish(),
327-
Err(CreateTxError::InvalidCurrentHeight(500_000_000))
325+
let err = builder.finish().unwrap_err();
326+
assert_matches!(err, CreateTxError::InvalidCurrentHeight(500_000_000));
327+
assert_eq!(
328+
err.to_string(),
329+
"Cannot use height 500000000 as a locktime (must be below 500_000_000)"
328330
);
329331
}
330332

0 commit comments

Comments
 (0)