MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / TestLoadWorkflowJSON

Function TestLoadWorkflowJSON

internal/cli/workflow_test.go:55–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestLoadWorkflowJSON(t *testing.T) {
56 dir := t.TempDir()
57 path := filepath.Join(dir, "wf.json")
58 os.WriteFile(path, []byte(`{"steps":[{"pattern":"a"},{"pattern":"b"}]}`), 0o644)
59
60 wf, err := LoadWorkflow(path)
61 if err != nil {
62 t.Fatalf("unexpected error: %v", err)
63 }
64 if len(wf.Steps) != 2 || wf.Steps[1].Pattern != "b" {
65 t.Fatalf("unexpected steps: %+v", wf.Steps)
66 }
67}
68
69func TestLoadWorkflowBadPath(t *testing.T) {
70 tests := []struct {

Callers

nothing calls this directly

Calls 1

LoadWorkflowFunction · 0.85

Tested by

no test coverage detected