(t *testing.T)
| 4198 | } |
| 4199 | |
| 4200 | func TestRateLimitError(t *testing.T) { |
| 4201 | t.Parallel() |
| 4202 | u, err := url.Parse("https://example.com") |
| 4203 | if err != nil { |
| 4204 | t.Fatal(err) |
| 4205 | } |
| 4206 | |
| 4207 | r := &RateLimitError{ |
| 4208 | Response: &http.Response{ |
| 4209 | Request: &http.Request{Method: "PUT", URL: u}, |
| 4210 | StatusCode: http.StatusTooManyRequests, |
| 4211 | }, |
| 4212 | Message: "<msg>", |
| 4213 | } |
| 4214 | if got, want := r.Error(), "PUT https://example.com: 429 <msg> [rate limit was reset"; !strings.Contains(got, want) { |
| 4215 | t.Errorf("RateLimitError = %q, want %q", got, want) |
| 4216 | } |
| 4217 | } |
| 4218 | |
| 4219 | func TestAcceptedError(t *testing.T) { |
| 4220 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…