mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
ty fixes
This commit is contained in:
parent
f5afbf2188
commit
01bc5a990b
4 changed files with 13 additions and 0 deletions
|
@ -594,6 +594,8 @@ mod tests {
|
|||
photo: None,
|
||||
pinned_message: None,
|
||||
message_auto_delete_time: None,
|
||||
has_hidden_members: false,
|
||||
has_aggressive_anti_spam_enabled: false,
|
||||
};
|
||||
let actual = from_str(r#"{"id":-1,"type":"channel","username":"channel_name"}"#).unwrap();
|
||||
assert_eq!(expected, actual);
|
||||
|
@ -616,6 +618,8 @@ mod tests {
|
|||
photo: None,
|
||||
pinned_message: None,
|
||||
message_auto_delete_time: None,
|
||||
has_hidden_members: false,
|
||||
has_aggressive_anti_spam_enabled: false,
|
||||
},
|
||||
from_str(r#"{"id":0,"type":"private","username":"username","first_name":"Anon"}"#)
|
||||
.unwrap()
|
||||
|
@ -638,6 +642,8 @@ mod tests {
|
|||
photo: None,
|
||||
pinned_message: None,
|
||||
message_auto_delete_time: None,
|
||||
has_hidden_members: false,
|
||||
has_aggressive_anti_spam_enabled: false,
|
||||
};
|
||||
|
||||
let json = to_string(&chat).unwrap();
|
||||
|
|
|
@ -573,6 +573,7 @@ mod tests {
|
|||
caption: None,
|
||||
parse_mode: None,
|
||||
caption_entities: None,
|
||||
has_spoiler: false,
|
||||
});
|
||||
|
||||
let actual_json = serde_json::to_string(&photo).unwrap();
|
||||
|
@ -592,6 +593,7 @@ mod tests {
|
|||
duration: None,
|
||||
supports_streaming: None,
|
||||
caption_entities: None,
|
||||
has_spoiler: false,
|
||||
});
|
||||
|
||||
let actual_json = serde_json::to_string(&video).unwrap();
|
||||
|
@ -610,6 +612,7 @@ mod tests {
|
|||
height: None,
|
||||
duration: None,
|
||||
caption_entities: None,
|
||||
has_spoiler: false,
|
||||
});
|
||||
|
||||
let actual_json = serde_json::to_string(&video).unwrap();
|
||||
|
|
|
@ -1630,6 +1630,8 @@ mod tests {
|
|||
message_auto_delete_time: None,
|
||||
photo: None,
|
||||
pinned_message: None,
|
||||
has_hidden_members: false,
|
||||
has_aggressive_anti_spam_enabled: false,
|
||||
};
|
||||
|
||||
assert!(message.from().unwrap().is_anonymous());
|
||||
|
|
|
@ -348,6 +348,8 @@ mod test {
|
|||
photo: None,
|
||||
pinned_message: None,
|
||||
message_auto_delete_time: None,
|
||||
has_hidden_members: false,
|
||||
has_aggressive_anti_spam_enabled: false,
|
||||
},
|
||||
kind: MessageKind::Common(MessageCommon {
|
||||
from: Some(User {
|
||||
|
|
Loading…
Reference in a new issue