(t *testing.T)
| 648 | } |
| 649 | |
| 650 | func TestServerResourcesGetAllHandlerNegativeCount(t *testing.T) { |
| 651 | req := httptest.NewRequest(http.MethodGet, "/Users?count=-1", nil) |
| 652 | rr := httptest.NewRecorder() |
| 653 | newTestServer().ServeHTTP(rr, req) |
| 654 | |
| 655 | assertEqualStatusCode(t, http.StatusOK, rr.Code) |
| 656 | |
| 657 | var response listResponse |
| 658 | assertUnmarshalNoError(t, json.Unmarshal(rr.Body.Bytes(), &response)) |
| 659 | assertEqual(t, 20, response.TotalResults) |
| 660 | assertEqual(t, 0, len(response.Resources)) |
| 661 | } |
| 662 | |
| 663 | func TestServerResourcesGetAllHandlerNonIntCount(t *testing.T) { |
| 664 | req := httptest.NewRequest(http.MethodGet, "/Users?count=BadBanana", nil) |
nothing calls this directly
no test coverage detected
searching dependent graphs…