(t *testing.T)
| 1159 | } |
| 1160 | |
| 1161 | func TestClient_BaseURL(t *testing.T) { |
| 1162 | t.Parallel() |
| 1163 | |
| 1164 | customBaseURL := "https://custom-url/api/v3/" |
| 1165 | |
| 1166 | for _, tt := range []struct { |
| 1167 | name string |
| 1168 | client *Client |
| 1169 | wantBaseURL string |
| 1170 | }{ |
| 1171 | { |
| 1172 | name: "default_base_url", |
| 1173 | client: mustNewClient(t), |
| 1174 | wantBaseURL: defaultBaseURL, |
| 1175 | }, |
| 1176 | { |
| 1177 | name: "custom_base_url", |
| 1178 | client: &Client{baseURL: mustParseURL(t, customBaseURL)}, |
| 1179 | wantBaseURL: customBaseURL, |
| 1180 | }, |
| 1181 | { |
| 1182 | name: "missing_base_url", |
| 1183 | client: &Client{}, |
| 1184 | wantBaseURL: "", |
| 1185 | }, |
| 1186 | } { |
| 1187 | t.Run(tt.name, func(t *testing.T) { |
| 1188 | t.Parallel() |
| 1189 | |
| 1190 | if got, want := tt.client.BaseURL(), tt.wantBaseURL; got != want { |
| 1191 | t.Errorf("Client.BaseURL() = %v, want %v", got, want) |
| 1192 | } |
| 1193 | }) |
| 1194 | } |
| 1195 | } |
| 1196 | |
| 1197 | func TestClient_UploadURL(t *testing.T) { |
| 1198 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…