mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 17:52:12 +01:00
added test for descriptions="off" attribute
This commit is contained in:
parent
96a92b6ec2
commit
58cb5ad152
2 changed files with 17 additions and 1 deletions
|
@ -45,7 +45,7 @@ futures = "0.3.1"
|
|||
pin-project = "0.4.6"
|
||||
serde_with_macros = "1.0.1"
|
||||
|
||||
teloxide-macros = "0.3.0"
|
||||
teloxide-macros = { git = "http://github.com/teloxide/teloxide-macros", branch = "dev" }
|
||||
|
||||
[dev-dependencies]
|
||||
smart-default = "0.6.0"
|
||||
|
|
|
@ -171,3 +171,19 @@ fn parse_named_fields() {
|
|||
DefaultCommands::parse("/start 10 hello", "").unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn descriptions_off() {
|
||||
#[command(rename = "lowercase")]
|
||||
#[derive(BotCommand, Debug, PartialEq)]
|
||||
enum DefaultCommands {
|
||||
#[command(description = "off")]
|
||||
Start,
|
||||
Help,
|
||||
}
|
||||
|
||||
assert_eq!(
|
||||
DefaultCommands::descriptions(),
|
||||
"/help\n".to_owned()
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue