Skip to content

Commit f66dd3e

Browse files
committed
fix mark as invalid
1 parent ff75e85 commit f66dd3e

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

tests/localizations/test_localizations_addresses_path_object_3.json renamed to tests/localizations/test_localizations_addresses_path_object_3_invalid.json

File renamed without changes.

tests/localizations/test_localizations_addresses_path_object_4.json renamed to tests/localizations/test_localizations_addresses_path_object_4_invalid.json

File renamed without changes.

tests/localizations/test_localizations_titles_components.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/test_localizations.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,12 @@ mod test {
669669
Ok(())
670670
}
671671

672+
/// The card in the test is not valid as the RFC states
673+
/// Because we cannot replace inexistent components
674+
/// But we still handle it
672675
#[test]
673-
fn test_localizations_addresses_path_object_3() -> Result<(), Box<dyn std::error::Error>> {
676+
fn test_localizations_addresses_path_object_3_invalid() -> Result<(), Box<dyn std::error::Error>>
677+
{
674678
let json = serde_json::json!({
675679
"@type": "Card",
676680
"version": "1.0",
@@ -719,7 +723,7 @@ mod test {
719723
}
720724
});
721725
std::fs::write(
722-
"tests/localizations/test_localizations_addresses_path_object_3.json",
726+
"tests/localizations/test_localizations_addresses_path_object_3_invalid.json",
723727
serde_json::to_string_pretty(&json)?,
724728
)?;
725729
let card: Card = serde_json::from_value(json)?;
@@ -749,8 +753,12 @@ mod test {
749753
Ok(())
750754
}
751755

756+
/// The card in the test is not valid as the RFC states
757+
/// Because we cannot replace inexistent components
758+
/// But we still handle it
752759
#[test]
753-
fn test_localizations_addresses_path_object_4() -> Result<(), Box<dyn std::error::Error>> {
760+
fn test_localizations_addresses_path_object_4_invalid() -> Result<(), Box<dyn std::error::Error>>
761+
{
754762
let json = serde_json::json!({
755763
"@type": "Card",
756764
"version": "1.0",
@@ -785,7 +793,7 @@ mod test {
785793
}
786794
});
787795
std::fs::write(
788-
"tests/localizations/test_localizations_addresses_path_object_4.json",
796+
"tests/localizations/test_localizations_addresses_path_object_4_invalid.json",
789797
serde_json::to_string_pretty(&json)?,
790798
)?;
791799
let card: Card = serde_json::from_value(json)?;
@@ -1193,7 +1201,7 @@ mod test {
11931201
"localizations": {
11941202
"en": {
11951203
"keywords": {
1196-
"a_keyword": true
1204+
"a_keyword": true
11971205
}
11981206
}
11991207
}

0 commit comments

Comments
 (0)