From 7c9238527fc1f62e22672f0573be19fe72128c69 Mon Sep 17 00:00:00 2001 From: _ <> Date: Tue, 27 Apr 2021 14:36:05 -0500 Subject: [PATCH] :white_check_mark: tests: add test for serializing tripcodes --- crates/ptth_relay/src/key_validity.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ptth_relay/src/key_validity.rs b/crates/ptth_relay/src/key_validity.rs index bc19223..dbe1c23 100644 --- a/crates/ptth_relay/src/key_validity.rs +++ b/crates/ptth_relay/src/key_validity.rs @@ -185,6 +185,11 @@ mod tests { let j = json! ({ "tripcode": tripcode, }); + + let s = serde_json::to_string (&j).unwrap (); + + let j = serde_json::from_str:: (&s).unwrap (); + assert_eq! (j, json! ({"tripcode": tripcode})); } #[test]