Skip to content

Commit 9c7a22c

Browse files
committed
refactor: remove schema test changes that overlap with PR #3101
The #[test] attribute fix and schema_defs test improvements for should_set_empty_schema_defs are already covered by PR #3101. Removing duplicates to keep PRs independent.
1 parent 8476dc8 commit 9c7a22c

2 files changed

Lines changed: 2 additions & 26 deletions

File tree

packages/rs-dpp/src/data_contract/v0/methods/schema.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff 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(

packages/rs-dpp/src/data_contract/v1/methods/schema.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)