mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-23 07:09:34 +01:00
Fix the tests
This commit is contained in:
parent
d165de64d7
commit
a801953516
2 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue