File tree Expand file tree Collapse file tree 1 file changed +5
-16
lines changed
Expand file tree Collapse file tree 1 file changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ fn shapshots() {
9898///
9999/// See <https://github.com/ChainSafe/forest/issues/3459>.
100100#[ test]
101- #[ should_panic = "cannot serialize to v2 AND v3 from the same input" ]
102101fn cannot_call_arbitrary_tests_on_receipt ( ) {
103102 use pretty_assertions:: assert_eq;
104103
@@ -130,19 +129,9 @@ fn cannot_call_arbitrary_tests_on_receipt() {
130129 json
131130 ) ;
132131
133- // both of these cannot pass at the same time...
134- assert_eq ! (
135- v2,
136- serde_json:: from_value:: <LotusJson <_>>( json. clone( ) )
137- . unwrap( )
138- . into_inner( ) ,
139- "cannot serialize to v2 AND v3 from the same input"
140- ) ;
141- assert_eq ! (
142- v3,
143- serde_json:: from_value:: <LotusJson <_>>( json)
144- . unwrap( )
145- . into_inner( ) ,
146- "cannot serialize to v2 AND v3 from the same input"
147- ) ;
132+ let deserialized = serde_json:: from_value :: < LotusJson < Receipt > > ( json)
133+ . unwrap ( )
134+ . into_inner ( ) ;
135+ assert ! ( matches!( deserialized, Receipt :: V3 ( _) ) ) ;
136+ assert_eq ! ( v3, deserialized) ;
148137}
You can’t perform that action at this time.
0 commit comments