(t *testing.T)
| 964 | } |
| 965 | |
| 966 | func TestEscapePathPreserveSlashes(t *testing.T) { |
| 967 | t.Parallel() |
| 968 | // The function is unexported, so test it indirectly via BuildBranchURL. |
| 969 | // A branch with a space in a segment should be escaped, but slashes preserved. |
| 970 | gp, err := gitprovider.New("github", "", nil) |
| 971 | require.NoError(t, err) |
| 972 | require.NotNil(t, gp) |
| 973 | got := gp.BuildBranchURL("owner", "repo", "feat/my thing") |
| 974 | assert.Equal(t, "https://github.com/owner/repo/tree/feat/my%20thing", got) |
| 975 | } |
nothing calls this directly
no test coverage detected