mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
parent
3615004729
commit
7f6d2c2801
3 changed files with 10 additions and 1 deletions
|
@ -56,7 +56,8 @@ full = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
teloxide-core = { version = "0.6.0", default-features = false }
|
#teloxide-core = { version = "0.6.0", default-features = false }
|
||||||
|
teloxide-core = { git = "https://github.com/teloxide/teloxide-core", rev = "b13393d", default-features = false }
|
||||||
teloxide-macros = { version = "0.6.2", optional = true }
|
teloxide-macros = { version = "0.6.2", optional = true }
|
||||||
|
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
|
@ -191,6 +191,8 @@ mod tests {
|
||||||
last_name: None,
|
last_name: None,
|
||||||
username: Some("abcd".to_string()),
|
username: Some("abcd".to_string()),
|
||||||
language_code: None,
|
language_code: None,
|
||||||
|
is_premium: false,
|
||||||
|
added_to_attachment_menu: false,
|
||||||
};
|
};
|
||||||
assert_eq!(user_mention_or_link(&user_with_username), "@abcd");
|
assert_eq!(user_mention_or_link(&user_with_username), "@abcd");
|
||||||
let user_without_username = User {
|
let user_without_username = User {
|
||||||
|
@ -200,6 +202,8 @@ mod tests {
|
||||||
last_name: None,
|
last_name: None,
|
||||||
username: None,
|
username: None,
|
||||||
language_code: None,
|
language_code: None,
|
||||||
|
is_premium: false,
|
||||||
|
added_to_attachment_menu: false,
|
||||||
};
|
};
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
user_mention_or_link(&user_without_username),
|
user_mention_or_link(&user_without_username),
|
||||||
|
|
|
@ -240,6 +240,8 @@ mod tests {
|
||||||
last_name: None,
|
last_name: None,
|
||||||
username: Some("abcd".to_string()),
|
username: Some("abcd".to_string()),
|
||||||
language_code: None,
|
language_code: None,
|
||||||
|
is_premium: false,
|
||||||
|
added_to_attachment_menu: false,
|
||||||
};
|
};
|
||||||
assert_eq!(user_mention_or_link(&user_with_username), "@abcd");
|
assert_eq!(user_mention_or_link(&user_with_username), "@abcd");
|
||||||
let user_without_username = User {
|
let user_without_username = User {
|
||||||
|
@ -249,6 +251,8 @@ mod tests {
|
||||||
last_name: None,
|
last_name: None,
|
||||||
username: None,
|
username: None,
|
||||||
language_code: None,
|
language_code: None,
|
||||||
|
is_premium: false,
|
||||||
|
added_to_attachment_menu: false,
|
||||||
};
|
};
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
user_mention_or_link(&user_without_username),
|
user_mention_or_link(&user_without_username),
|
||||||
|
|
Loading…
Reference in a new issue