Skip to content

Commit 012534f

Browse files
committed
fix: Update test to use Agent instead of string
1 parent 742365f commit 012534f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/chat-cli/src/util/directories.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,14 @@ mod tests {
343343
let temp_dir = tempfile::TempDir::new().unwrap();
344344
let os = create_test_os(&temp_dir).await;
345345

346-
let agent_dir = agent_knowledge_dir(&os, "test-agent").unwrap();
346+
// Create a test agent
347+
let test_agent = crate::cli::Agent {
348+
name: "test-agent".to_string(),
349+
path: None,
350+
..Default::default()
351+
};
352+
353+
let agent_dir = agent_knowledge_dir(&os, Some(&test_agent)).unwrap();
347354
// The path will be transformed by chroot_path, so we need to get the actual home dir first
348355
let home = home_dir(&os).unwrap();
349356
let expected = home

0 commit comments

Comments
 (0)