From a801953516095406e67e8ea9eb1511c80a10c659 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Mon, 24 Feb 2020 21:29:09 +0600 Subject: [PATCH] Fix the tests --- src/types/update.rs | 6 +++--- src/types/user.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/update.rs b/src/types/update.rs index 5870c13f..39b8a1aa 100644 --- a/src/types/update.rs +++ b/src/types/update.rs @@ -107,8 +107,8 @@ impl Update { #[cfg(test)] mod test { use crate::types::{ - Chat, ChatKind, ForwardKind, LanguageCode, MediaKind, Message, - MessageKind, Update, UpdateKind, User, + Chat, ChatKind, ForwardKind, MediaKind, Message, MessageKind, Update, + UpdateKind, User, }; // TODO: more tests for deserialization @@ -158,7 +158,7 @@ mod test { first_name: String::from("Waffle"), last_name: None, username: Some(String::from("WaffleLapkin")), - language_code: Some(LanguageCode::EN), + language_code: Some(String::from("en")), }), forward_kind: ForwardKind::Origin { reply_to_message: None, diff --git a/src/types/user.rs b/src/types/user.rs index dfc33334..1ebac900 100644 --- a/src/types/user.rs +++ b/src/types/user.rs @@ -85,7 +85,7 @@ mod tests { first_name: "firstName".to_string(), last_name: Some("lastName".to_string()), username: Some("Username".to_string()), - language_code: Some(LanguageCode::RU), + language_code: Some(String::from("ru")), }; let actual = serde_json::from_str::(&json).unwrap(); assert_eq!(actual, expected)