mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-06 08:18:58 +00:00
Convert workflow list test to use fabro_snapshot
Replace predicates::str::contains assertion with a full snapshot, making the test more precise and consistent with other cmd/ tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cb072aed75
commit
b638b8d84f
1 changed files with 19 additions and 10 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use fabro_test::test_context;
|
||||
use predicates;
|
||||
use fabro_test::{fabro_snapshot, test_context};
|
||||
|
||||
#[test]
|
||||
fn list() {
|
||||
|
|
@ -12,12 +11,22 @@ fn list() {
|
|||
"version = 1\ngoal = \"A test workflow\"\n",
|
||||
);
|
||||
|
||||
context
|
||||
.command()
|
||||
.args(["workflow", "list"])
|
||||
.current_dir(&context.temp_dir)
|
||||
.assert()
|
||||
.success()
|
||||
// workflow list prints to stderr
|
||||
.stderr(predicates::str::contains("my_test_wf"));
|
||||
let mut cmd = context.command();
|
||||
cmd.args(["workflow", "list"]);
|
||||
cmd.current_dir(&context.temp_dir);
|
||||
fabro_snapshot!(context.filters(), cmd, @"
|
||||
success: true
|
||||
exit_code: 0
|
||||
----- stdout -----
|
||||
----- stderr -----
|
||||
1 workflow(s) found
|
||||
|
||||
User Workflows (~/.fabro/workflows)
|
||||
(none)
|
||||
|
||||
Project Workflows (workflows)
|
||||
|
||||
NAME DESCRIPTION
|
||||
my_test_wf A test workflow
|
||||
");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue