Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pkg/workflow/create_issue_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import (

// TestCreateIssueGroupFieldParsing verifies that the group field is parsed correctly
func TestCreateIssueGroupFieldParsing(t *testing.T) {
strPtr := func(s string) *string { return &s }
tests := []struct {
name string
frontmatter string
expectedGroup bool
expectedGroup *string
}{
{
name: "group enabled with true",
Expand All @@ -34,7 +35,7 @@ safe-outputs:
---

Test content`,
expectedGroup: true,
expectedGroup: strPtr("true"),
},
{
name: "group disabled with false",
Expand All @@ -51,10 +52,10 @@ safe-outputs:
---

Test content`,
expectedGroup: false,
expectedGroup: strPtr("false"),
},
{
name: "group not specified defaults to false",
name: "group not specified defaults to nil",
frontmatter: `---
name: Test Workflow
on: workflow_dispatch
Expand All @@ -67,7 +68,7 @@ safe-outputs:
---

Test content`,
expectedGroup: false,
expectedGroup: nil,
},
}

Expand Down