()
| 113 | |
| 114 | #[tokio::test] |
| 115 | async fn test_validate_invalid_value() { |
| 116 | let (mut peg_in_graph, _, _, _) = setup_and_create_graphs().await; |
| 117 | |
| 118 | let deposit_tx = peg_in_graph.peg_in_deposit_transaction.tx_mut(); |
| 119 | deposit_tx.output[0].value = Amount::from_sat(1); |
| 120 | let deposit_txid = deposit_tx.compute_txid(); |
| 121 | |
| 122 | let result = peg_in_graph.validate(); |
| 123 | |
| 124 | assert!(matches!( |
| 125 | result, |
| 126 | Err(Error::Validation(ValidationError::TxValidationFailed( |
| 127 | _, |
| 128 | _, |
| 129 | _ |
| 130 | ))) |
| 131 | )); |
| 132 | |
| 133 | if let Err(Error::Validation(ValidationError::TxValidationFailed(tx_name, txid, input_index))) = |
| 134 | result |
| 135 | { |
| 136 | assert_eq!(tx_name, "PegInDeposit"); |
| 137 | assert_eq!(txid, deposit_txid); |
| 138 | assert_eq!(input_index, 0); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | #[tokio::test] |
| 143 | async fn test_validate_invalid_script_pubkey() { |
nothing calls this directly
no test coverage detected