(t *testing.T)
| 1554 | } |
| 1555 | |
| 1556 | func TestReadSourceRepoFromFile_ValidSource(t *testing.T) { |
| 1557 | dir := t.TempDir() |
| 1558 | f := filepath.Join(dir, "wf.md") |
| 1559 | content := `--- |
| 1560 | source: github/gh-aw/.github/workflows/wf.md@abc123 |
| 1561 | --- |
| 1562 | # Workflow |
| 1563 | ` |
| 1564 | require.NoError(t, os.WriteFile(f, []byte(content), 0644)) |
| 1565 | assert.Equal(t, "github/gh-aw", readSourceRepoFromFile(f), "should return owner/repo") |
| 1566 | } |
| 1567 | |
| 1568 | func TestReadSourceRepoFromFile_NoSource(t *testing.T) { |
| 1569 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected