(t *testing.T)
| 261 | } |
| 262 | |
| 263 | func TestAPIClient_URLConstruction(t *testing.T) { |
| 264 | mock := testutil.NewMockAPI() |
| 265 | defer mock.Close() |
| 266 | |
| 267 | mock.On("GET", "/monitors/abc123", 200, `{}`) |
| 268 | |
| 269 | client := newTestClient(mock.Server.URL) |
| 270 | _, err := client.GET("/monitors/abc123", nil) |
| 271 | if err != nil { |
| 272 | t.Fatalf("unexpected error: %v", err) |
| 273 | } |
| 274 | |
| 275 | req := mock.LastRequest() |
| 276 | if req.Path != "/monitors/abc123" { |
| 277 | t.Errorf("expected /monitors/abc123, got %s", req.Path) |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | // --- Error Response Tests --- |
| 282 |
nothing calls this directly
no test coverage detected