mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-09-17 07:11:23 +02:00
Create a workspace in the environment test fixtures
Fresh databases stopped getting a default workspace with the home screen (#660), so the fixtures from #654 that took the first workspace panicked on an empty list. They now create one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
621f9c3b8f
commit
caeebebc75
@@ -232,7 +232,11 @@ mod tests {
|
||||
let source = &UpdateSource::Background;
|
||||
let (base, staging, folder) = manager
|
||||
.with_tx(|db| {
|
||||
let workspace = db.list_workspaces()?.remove(0);
|
||||
// Fresh databases no longer come with a workspace, so make one
|
||||
let workspace = db.upsert_workspace(
|
||||
&Workspace { name: "Test".into(), ..Default::default() },
|
||||
source,
|
||||
)?;
|
||||
let variable = |name: &str, value: &str| EnvironmentVariable {
|
||||
enabled: true,
|
||||
name: name.into(),
|
||||
|
||||
Reference in New Issue
Block a user