(t *testing.T)
| 154 | } |
| 155 | |
| 156 | func TestScheduleCodemod_StandardCron_NoChange(t *testing.T) { |
| 157 | codemod := getScheduleAtToAroundCodemod() |
| 158 | |
| 159 | content := `--- |
| 160 | on: |
| 161 | schedule: |
| 162 | - cron: "0 9 * * *" |
| 163 | --- |
| 164 | |
| 165 | # Test` |
| 166 | |
| 167 | frontmatter := map[string]any{ |
| 168 | "on": map[string]any{ |
| 169 | "schedule": []any{ |
| 170 | map[string]any{"cron": "0 9 * * *"}, |
| 171 | }, |
| 172 | }, |
| 173 | } |
| 174 | |
| 175 | result, applied, err := codemod.Apply(content, frontmatter) |
| 176 | |
| 177 | require.NoError(t, err) |
| 178 | assert.False(t, applied) |
| 179 | assert.Equal(t, content, result) |
| 180 | } |
| 181 | |
| 182 | func TestScheduleCodemod_PreservesIndentation(t *testing.T) { |
| 183 | codemod := getScheduleAtToAroundCodemod() |
nothing calls this directly
no test coverage detected