mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Add the 'dice_works' test
This commit is contained in:
parent
d1352f8869
commit
bfeec6b1bb
1 changed files with 32 additions and 0 deletions
|
@ -269,4 +269,36 @@ mod test {
|
|||
|
||||
serde_json::from_str::<Update>(json).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dice_works() {
|
||||
let json = r#"
|
||||
{
|
||||
"message": {
|
||||
"chat": {
|
||||
"id": -1001276785818,
|
||||
"title": "bla bla bla chat",
|
||||
"type": "supergroup",
|
||||
"username": "teloxide_dev"
|
||||
},
|
||||
"date": 1596014550,
|
||||
"dice": {
|
||||
"emoji": "🎲",
|
||||
"value": 2
|
||||
},
|
||||
"from": {
|
||||
"first_name": "Hirrolot",
|
||||
"id": 408258968,
|
||||
"is_bot": false,
|
||||
"language_code": "en",
|
||||
"username": "hirrolot"
|
||||
},
|
||||
"message_id": 35410
|
||||
},
|
||||
"update_id": 573255266
|
||||
}
|
||||
"#;
|
||||
|
||||
serde_json::from_str::<Update>(json).unwrap();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue