Skip to content

Commit bb4ceaf

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 223b919 commit bb4ceaf

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,17 +174,6 @@ 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 schema = platform_value!({
191179
"type": "object",
@@ -205,7 +193,7 @@ mod test {
205193
version: 0,
206194
owner_id: Default::default(),
207195
schema_defs: defs_map,
208-
document_schemas: BTreeMap::from([("document_type_name".to_string(), schema)]),
196+
document_schemas: Default::default(),
209197
};
210198

211199
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,17 +174,6 @@ 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 schema = platform_value!({
191179
"type": "object",
@@ -205,7 +193,7 @@ mod test {
205193
version: 0,
206194
owner_id: Default::default(),
207195
schema_defs: defs_map,
208-
document_schemas: BTreeMap::from([("document_type_name".to_string(), schema)]),
196+
document_schemas: Default::default(),
209197
};
210198

211199
let mut data_contract = DataContractV1::try_from_platform_versioned(

0 commit comments

Comments
 (0)