(t *testing.T)
| 159 | } |
| 160 | |
| 161 | func 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 | |
| 186 | func TestCategorizeHost(t *testing.T) { |
| 187 | tests := []struct { |
nothing calls this directly
no test coverage detected