Skip to content

Commit 242d652

Browse files
committed
test: tighten inspector workflow refresh assertions
CodeRabbit pointed out that the regression test carried an unused checklistPath and only asserted that empty workflow initialization produced some data. The test now keeps the setup focused and checks the exact default workflow count. Constraint: Address actionable CodeRabbit feedback on PR #225 Confidence: high Scope-risk: narrow Tested: env -u GOROOT go test ./internal/app -run TestInspectorEnsureWorkflows -count=1 Tested: env -u GOROOT make test Tested: env -u GOROOT make build Tested: env -u GOROOT go vet ./... Tested: git diff --check
1 parent edf56aa commit 242d652

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

internal/app/screen_inspector_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99

1010
func TestInspectorEnsureWorkflowsKeepsExistingWorkflows(t *testing.T) {
1111
im := inspectorModel{
12-
checklistPath: "new-checklist.yaml",
1312
workflows: []inspector.Workflow{
1413
{
1514
Kind: inspector.WorkflowSecurity,
@@ -35,8 +34,8 @@ func TestInspectorEnsureWorkflowsRefreshesEmptyWorkflows(t *testing.T) {
3534

3635
im.ensureWorkflows()
3736

38-
if len(im.workflows) == 0 {
39-
t.Fatal("expected empty workflow list to be populated")
37+
if len(im.workflows) != 2 {
38+
t.Fatalf("expected empty workflow list to be populated with 2 workflows, got %d", len(im.workflows))
4039
}
4140
}
4241

0 commit comments

Comments
 (0)