aboutsummaryrefslogtreecommitdiff
path: root/minecraft-chat/tests
diff options
context:
space:
mode:
Diffstat (limited to 'minecraft-chat/tests')
-rw-r--r--minecraft-chat/tests/integration_test.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/minecraft-chat/tests/integration_test.rs b/minecraft-chat/tests/integration_test.rs
index 4c8a39aa..a454ad3b 100644
--- a/minecraft-chat/tests/integration_test.rs
+++ b/minecraft-chat/tests/integration_test.rs
@@ -65,3 +65,10 @@ fn complex_ansi_test() {
)
);
}
+
+#[test]
+fn component_from_string() {
+ let j: Value = serde_json::from_str("\"foo\"").unwrap();
+ let component = Component::new(&j).unwrap();
+ assert_eq!(component.to_ansi(None), "foo");
+}