MCPcopy Create free account
hub / github.com/cli/cli / TestUserAssetUploadPrefix

Function TestUserAssetUploadPrefix

internal/ghinstance/host_test.go:161–184  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

159}
160
161func TestUserAssetUploadPrefix(t *testing.T) {
162 tests := []struct {
163 host string
164 want string
165 }{
166 {
167 host: "github.com",
168 want: "https://uploads.github.com/",
169 },
170 {
171 host: "tenant.ghe.com",
172 want: "https://uploads.tenant.ghe.com/",
173 },
174 {
175 host: "github.localhost",
176 want: "http://uploads.github.localhost/",
177 },
178 }
179 for _, tt := range tests {
180 t.Run(tt.host, func(t *testing.T) {
181 assert.Equal(t, tt.want, UserAssetUploadPrefix(tt.host))
182 })
183 }
184}
185
186func TestCategorizeHost(t *testing.T) {
187 tests := []struct {

Callers

nothing calls this directly

Calls 3

UserAssetUploadPrefixFunction · 0.85
EqualMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected