hive-agent: the /clear-todos tests set a harness dir, as the bus reads one
This commit is contained in:
parent
cbda9c162f
commit
cb9fbfc9da
1 changed files with 3 additions and 0 deletions
|
|
@ -261,6 +261,8 @@ mod tests {
|
|||
/// turn; any other body, even one that merely mentions it, goes through.
|
||||
#[tokio::test]
|
||||
async fn clear_todos_takes_its_message_and_marks_every_todo_done() {
|
||||
// `Bus::new` reads the harness dir; the CI sandbox sets none.
|
||||
let _harness = crate::paths::harness_dir_guard();
|
||||
let dir = tempfile::tempdir().expect("a dir");
|
||||
let todos = Todos::open(&dir.path().join("todos.sqlite")).expect("a store");
|
||||
todos.upsert("router", Some("a"), "a", None, true).unwrap();
|
||||
|
|
@ -305,6 +307,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn clear_todos_without_a_store_says_so() {
|
||||
let _harness = crate::paths::harness_dir_guard();
|
||||
let bus = Bus::new();
|
||||
let mut events = bus.subscribe();
|
||||
assert!(clear_todos("/clear-todos", None, &bus));
|
||||
|
|
|
|||
Loading…
Reference in a new issue