(t *testing.T)
| 235 | } |
| 236 | |
| 237 | func TestScheduleCodemod_ScheduleField(t *testing.T) { |
| 238 | codemod := getScheduleAtToAroundCodemod() |
| 239 | |
| 240 | content := `--- |
| 241 | on: |
| 242 | schedule: |
| 243 | - schedule: daily at 09:00 |
| 244 | --- |
| 245 | |
| 246 | # Test` |
| 247 | |
| 248 | frontmatter := map[string]any{ |
| 249 | "on": map[string]any{ |
| 250 | "schedule": []any{ |
| 251 | map[string]any{"schedule": "daily at 09:00"}, |
| 252 | }, |
| 253 | }, |
| 254 | } |
| 255 | |
| 256 | result, applied, err := codemod.Apply(content, frontmatter) |
| 257 | |
| 258 | require.NoError(t, err) |
| 259 | assert.True(t, applied) |
| 260 | assert.Contains(t, result, "schedule: daily around 09:00") |
| 261 | } |
| 262 | |
| 263 | func TestScheduleCodemod_PreservesMarkdown(t *testing.T) { |
| 264 | codemod := getScheduleAtToAroundCodemod() |
nothing calls this directly
no test coverage detected