Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Add test for GetTransaction conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharding committed Jun 13, 2024
1 parent 049c98d commit 5deb7ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion integration_test/src/v17/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ macro_rules! impl_test_v17__gettransaction {
#[test]
fn get_transaction() {
use bitcoin::Amount;
use client::json::model;

let bitcoind = $crate::bitcoind_with_default_wallet();
let address = bitcoind.client.new_address().expect("failed to create new address");
Expand All @@ -105,7 +106,8 @@ macro_rules! impl_test_v17__gettransaction {
.send_to_address(&address, Amount::from_sat(10_000))
.expect("sendtoaddress");

let _ = bitcoind.client.get_transaction(txid).expect("gettransaction");
let json = bitcoind.client.get_transaction(txid).expect("gettransaction");
let _: model::GetTransaction = json.try_into().unwrap();
}
};
}

0 comments on commit 5deb7ed

Please sign in to comment.