MCPcopy Create free account
hub / github.com/elimity-com/scim / TestServerResourcesGetAllHandlerNegativeCount

Function TestServerResourcesGetAllHandlerNegativeCount

handlers_test.go:650–661  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

648}
649
650func 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
663func TestServerResourcesGetAllHandlerNonIntCount(t *testing.T) {
664 req := httptest.NewRequest(http.MethodGet, "/Users?count=BadBanana", nil)

Callers

nothing calls this directly

Calls 5

assertEqualStatusCodeFunction · 0.85
assertUnmarshalNoErrorFunction · 0.85
assertEqualFunction · 0.85
ServeHTTPMethod · 0.80
newTestServerFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…