aboutsummaryrefslogtreecommitdiff
path: root/src/app/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/api')
-rw-r--r--src/app/api/layouts.rs4
-rw-r--r--src/app/api/worktrees.rs7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/app/api/layouts.rs b/src/app/api/layouts.rs
index 943ed835..74190434 100644
--- a/src/app/api/layouts.rs
+++ b/src/app/api/layouts.rs
@@ -747,7 +747,7 @@ mod tests {
second: Box::new(LayoutNode::Pane {
pane: LayoutPane {
label: Some("tests".into()),
- command: Some(vec!["sh".into(), "-c".into(), "true".into()]),
+ command: Some(vec![exiting_test_command().into()]),
env: std::collections::HashMap::from([(
"HERDR_ROLE".into(),
"tests".into(),
@@ -789,7 +789,7 @@ mod tests {
assert_eq!(second_pane.label.as_deref(), Some("tests"));
assert_eq!(
second_pane.command,
- Some(vec!["sh".into(), "-c".into(), "true".into()])
+ Some(vec![exiting_test_command().into()])
);
assert!(matches!(
&app.event_hub.events_after(0).last().expect("layout event").1.data,
diff --git a/src/app/api/worktrees.rs b/src/app/api/worktrees.rs
index fd7bb0fb..3c8407b9 100644
--- a/src/app/api/worktrees.rs
+++ b/src/app/api/worktrees.rs
@@ -794,13 +794,15 @@ mod tests {
fn test_app_with_event_hub(event_hub: crate::api::EventHub) -> App {
let (_api_tx, api_rx) = tokio::sync::mpsc::unbounded_channel();
- App::new(
+ let mut app = App::new(
&Config::default(),
crate::app::AppPolicy::TEST,
None,
api_rx,
event_hub,
- )
+ );
+ app.state.default_shell = test_shell().into();
+ app
}
#[cfg(windows)]
@@ -815,7 +817,6 @@ mod tests {
fn app_with_parent(repo: &Path) -> App {
let mut app = test_app();
- app.state.default_shell = test_shell().into();
let mut parent = Workspace::test_new("main");
parent.identity_cwd = repo.to_path_buf();
app.state.workspaces = vec![parent];