@@ -311,6 +311,7 @@ mod tests {
311
311
use crate :: primitives:: offer_type:: OfferType ;
312
312
use crate :: primitives:: price_increase_status:: PriceIncreaseStatus ;
313
313
use crate :: primitives:: product_type:: ProductType ;
314
+ use crate :: primitives:: purchase_platform:: PurchasePlatform ;
314
315
use crate :: primitives:: revocation_reason:: RevocationReason ;
315
316
use crate :: primitives:: status:: Status ;
316
317
use crate :: primitives:: subtype:: Subtype ;
@@ -595,6 +596,19 @@ mod tests {
595
596
. expect( "Expect preorder_date" )
596
597
. timestamp( )
597
598
) ;
599
+ assert_eq ! (
600
+ "71134" ,
601
+ app_transaction
602
+ . app_transaction_id
603
+ . expect( "Expect app_transaction_id" )
604
+ . to_string( )
605
+ ) ;
606
+ assert_eq ! (
607
+ PurchasePlatform :: IOS ,
608
+ app_transaction
609
+ . original_platform
610
+ . expect( "Expect original_platform" )
611
+ ) ;
598
612
}
599
613
Err ( err) => panic ! ( "Failed to verify and decode app transaction: {:?}" , err) ,
600
614
}
@@ -753,6 +767,20 @@ mod tests {
753
767
. offer_discount_type
754
768
. expect( "Expect offer_discount_type" )
755
769
) ;
770
+ assert_eq ! (
771
+ "71134" ,
772
+ transaction
773
+ . app_transaction_id
774
+ . expect( "Expect app_transaction_id" )
775
+ . to_string( )
776
+ ) ;
777
+ assert_eq ! (
778
+ "P1Y" ,
779
+ transaction
780
+ . offer_period
781
+ . expect( "Expect offer_period" )
782
+ . to_string( )
783
+ ) ;
756
784
}
757
785
Err ( err) => panic ! ( "Failed to verify and decode signed transaction: {:?}" , err) ,
758
786
}
@@ -849,6 +877,27 @@ mod tests {
849
877
. expect( "Expect renewal_date" )
850
878
. timestamp( )
851
879
) ;
880
+ assert_eq ! (
881
+ "71134" ,
882
+ renewal_info
883
+ . app_transaction_id
884
+ . expect( "Expect app_transaction_id" )
885
+ . to_string( )
886
+ ) ;
887
+ assert_eq ! (
888
+ "P1Y" ,
889
+ renewal_info
890
+ . offer_period
891
+ . expect( "Expect offer_period" )
892
+ . to_string( )
893
+ ) ;
894
+ assert_eq ! (
895
+ "7e3fb20b-4cdb-47cc-936d-99d65f608138" ,
896
+ renewal_info
897
+ . app_account_token
898
+ . expect( "Expect app_account_token" )
899
+ . to_string( )
900
+ ) ;
852
901
}
853
902
Err ( err) => panic ! ( "Failed to verify and decode renewal info: {:?}" , err) ,
854
903
}
0 commit comments