(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestScheduleCodemod_MonthlyOn(t *testing.T) { |
| 77 | codemod := getScheduleAtToAroundCodemod() |
| 78 | |
| 79 | content := `--- |
| 80 | on: |
| 81 | schedule: |
| 82 | - cron: monthly on 1 |
| 83 | --- |
| 84 | |
| 85 | # Test` |
| 86 | |
| 87 | frontmatter := map[string]any{ |
| 88 | "on": map[string]any{ |
| 89 | "schedule": []any{ |
| 90 | map[string]any{"cron": "monthly on 1"}, |
| 91 | }, |
| 92 | }, |
| 93 | } |
| 94 | |
| 95 | result, applied, err := codemod.Apply(content, frontmatter) |
| 96 | |
| 97 | require.NoError(t, err) |
| 98 | assert.True(t, applied) |
| 99 | assert.Contains(t, result, "0 0 1 * *") |
| 100 | assert.Contains(t, result, "# Converted from 'monthly on 1'") |
| 101 | } |
| 102 | |
| 103 | func TestScheduleCodemod_MonthlyOnAt(t *testing.T) { |
| 104 | codemod := getScheduleAtToAroundCodemod() |
nothing calls this directly
no test coverage detected