File tree Expand file tree Collapse file tree
packages/rs-dpp/src/data_contract Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,7 +161,6 @@ mod test {
161161 assert_eq ! ( defs_map. as_ref( ) , data_contract. schema_defs( ) )
162162 }
163163
164- #[ test]
165164 fn should_set_empty_schema_defs ( ) {
166165 let platform_version = PlatformVersion :: latest ( ) ;
167166
@@ -175,25 +174,14 @@ mod test {
175174 } ) ;
176175
177176 let defs_map = Some ( defs. into_btree_string_map ( ) . expect ( "should convert to map" ) ) ;
178- let schema = platform_value ! ( {
179- "type" : "object" ,
180- "properties" : {
181- "a" : {
182- "type" : "string" ,
183- "maxLength" : 10 ,
184- "position" : 0
185- }
186- } ,
187- "additionalProperties" : false
188- } ) ;
189177
190178 let serialization_format = DataContractInSerializationFormatV0 {
191179 id : Identifier :: random ( ) ,
192180 config,
193181 version : 0 ,
194182 owner_id : Default :: default ( ) ,
195183 schema_defs : defs_map,
196- document_schemas : BTreeMap :: from ( [ ( "document_type_name" . to_string ( ) , schema ) ] ) ,
184+ document_schemas : Default :: default ( ) ,
197185 } ;
198186
199187 let mut data_contract = DataContractV0 :: try_from_platform_versioned (
Original file line number Diff line number Diff line change @@ -161,7 +161,6 @@ mod test {
161161 assert_eq ! ( defs_map. as_ref( ) , data_contract. schema_defs( ) )
162162 }
163163
164- #[ test]
165164 fn should_set_empty_schema_defs ( ) {
166165 let platform_version = PlatformVersion :: latest ( ) ;
167166
@@ -175,25 +174,14 @@ mod test {
175174 } ) ;
176175
177176 let defs_map = Some ( defs. into_btree_string_map ( ) . expect ( "should convert to map" ) ) ;
178- let schema = platform_value ! ( {
179- "type" : "object" ,
180- "properties" : {
181- "a" : {
182- "type" : "string" ,
183- "maxLength" : 10 ,
184- "position" : 0
185- }
186- } ,
187- "additionalProperties" : false
188- } ) ;
189177
190178 let serialization_format = DataContractInSerializationFormatV0 {
191179 id : Identifier :: random ( ) ,
192180 config,
193181 version : 0 ,
194182 owner_id : Default :: default ( ) ,
195183 schema_defs : defs_map,
196- document_schemas : BTreeMap :: from ( [ ( "document_type_name" . to_string ( ) , schema ) ] ) ,
184+ document_schemas : Default :: default ( ) ,
197185 } ;
198186
199187 let mut data_contract = DataContractV1 :: try_from_platform_versioned (
You can’t perform that action at this time.
0 commit comments