Skip to content

Commit 4149ece

Browse files
committed
test: cover retry chat command
1 parent 9aa1066 commit 4149ece

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

crates/forge_main/src/model.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,34 @@ mod tests {
10961096
);
10971097
}
10981098

1099+
#[test]
1100+
fn test_parse_retry_command() {
1101+
let fixture = ForgeCommandManager::default();
1102+
let actual = fixture.parse("/retry").unwrap();
1103+
1104+
assert_eq!(actual, AppCommand::Retry);
1105+
}
1106+
1107+
#[test]
1108+
fn test_parse_retry_alias() {
1109+
let fixture = ForgeCommandManager::default();
1110+
let actual = fixture.parse("/r").unwrap();
1111+
1112+
assert_eq!(actual, AppCommand::Retry);
1113+
}
1114+
1115+
#[test]
1116+
fn test_retry_command_in_default_commands() {
1117+
let manager = ForgeCommandManager::default();
1118+
let commands = manager.list();
1119+
let contains_retry = commands.iter().any(|cmd| cmd.name == "retry");
1120+
1121+
assert!(
1122+
contains_retry,
1123+
"Retry command should be in default commands"
1124+
);
1125+
}
1126+
10991127
#[test]
11001128
fn test_sanitize_agent_id_basic() {
11011129
// Test basic sanitization

0 commit comments

Comments
 (0)