Fix the tests

This commit is contained in:
Temirkhan Myrzamadi 2020-02-24 21:29:09 +06:00
parent d165de64d7
commit a801953516
2 changed files with 4 additions and 4 deletions

View file

@ -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,

View file

@ -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::<User>(&json).unwrap();
assert_eq!(actual, expected)