(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestReadAuthURL_Exists(t *testing.T) { |
| 66 | dir := t.TempDir() |
| 67 | tokenPath := filepath.Join(dir, "token") |
| 68 | url := "https://example.com/cdn-cgi/access/cli?token=abc123" |
| 69 | require.NoError(t, os.WriteFile(tokenPath+".url", []byte(url), 0600)) |
| 70 | |
| 71 | assert.Equal(t, url, readAuthURL(tokenPath)) |
| 72 | } |
| 73 | |
| 74 | func TestReadAuthURL_NotExists(t *testing.T) { |
| 75 | dir := t.TempDir() |
nothing calls this directly
no test coverage detected