File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1564,6 +1564,23 @@ mod tests {
1564
1564
assert_eq ! ( tlv_stream. payer_note, Some ( & String :: from( "baz" ) ) ) ;
1565
1565
}
1566
1566
1567
+ #[ test]
1568
+ fn builds_invoice_request_with_raw_data ( ) {
1569
+ // We'll test that the raw_data builder option works as anticipated.
1570
+ let unsigned_invoice_request = OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
1571
+ . amount_msats ( 1000 )
1572
+ . build ( ) . unwrap ( )
1573
+ . request_invoice ( vec ! [ 1 ; 32 ] , payer_pubkey ( ) ) . unwrap ( )
1574
+ . raw_data ( )
1575
+ . build ( ) . unwrap ( ) ;
1576
+
1577
+ // Ensure that getting the raw data doesn't return an error.
1578
+ let _ = unsigned_invoice_request. raw_data ( ) ;
1579
+
1580
+ let invoice_request = unsigned_invoice_request
1581
+ . sign ( payer_sign) . unwrap ( ) ;
1582
+ }
1583
+
1567
1584
#[ test]
1568
1585
fn fails_signing_invoice_request ( ) {
1569
1586
match OfferBuilder :: new ( "foo" . into ( ) , recipient_pubkey ( ) )
You can’t perform that action at this time.
0 commit comments