(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestScheduleCodemod_DailyAt(t *testing.T) { |
| 23 | codemod := getScheduleAtToAroundCodemod() |
| 24 | |
| 25 | content := `--- |
| 26 | on: |
| 27 | schedule: |
| 28 | - cron: daily at 09:00 |
| 29 | --- |
| 30 | |
| 31 | # Test` |
| 32 | |
| 33 | frontmatter := map[string]any{ |
| 34 | "on": map[string]any{ |
| 35 | "schedule": []any{ |
| 36 | map[string]any{"cron": "daily at 09:00"}, |
| 37 | }, |
| 38 | }, |
| 39 | } |
| 40 | |
| 41 | result, applied, err := codemod.Apply(content, frontmatter) |
| 42 | |
| 43 | require.NoError(t, err) |
| 44 | assert.True(t, applied) |
| 45 | assert.Contains(t, result, "daily around 09:00") |
| 46 | assert.NotContains(t, result, "daily at 09:00") |
| 47 | } |
| 48 | |
| 49 | func TestScheduleCodemod_WeeklyOnAt(t *testing.T) { |
| 50 | codemod := getScheduleAtToAroundCodemod() |
nothing calls this directly
no test coverage detected