MCPcopy Create free account
hub / github.com/github/gh-aw / TestDetectWorkflowScheduleInfo

Function TestDetectWorkflowScheduleInfo

pkg/cli/add_interactive_schedule_test.go:71–260  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestDetectWorkflowScheduleInfo(t *testing.T) {
72 tests := []struct {
73 name string
74 content string
75 wantRawExpr string
76 wantFrequency string
77 wantIsUpdatable bool
78 wantIsMultiTrigger bool
79 wantIsOnMap bool
80 }{
81 {
82 name: "simple on: daily",
83 content: `---
84on: daily
85engine: copilot
86---
87# Daily report
88`,
89 wantRawExpr: "daily",
90 wantFrequency: "daily",
91 wantIsUpdatable: true,
92 },
93 {
94 name: "simple on: weekly",
95 content: `---
96on: weekly
97engine: copilot
98---
99`,
100 wantRawExpr: "weekly",
101 wantFrequency: "weekly",
102 wantIsUpdatable: true,
103 },
104 {
105 name: "simple on: hourly",
106 content: `---
107on: hourly
108engine: copilot
109---
110`,
111 wantRawExpr: "hourly",
112 wantFrequency: "hourly",
113 wantIsUpdatable: true,
114 },
115 {
116 name: "simple on: every 3h",
117 content: `---
118on: every 3h
119engine: copilot
120---
121`,
122 wantRawExpr: "every 3h",
123 wantFrequency: "3-hourly",
124 wantIsUpdatable: true,
125 },
126 {
127 name: "on: with custom cron",
128 content: `---

Callers

nothing calls this directly

Calls 2

RunMethod · 0.45

Tested by

no test coverage detected