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

Function TestServerResourcesGetAllHandlerNonIntCount

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

Source from the content-addressed store, hash-verified

661}
662
663func TestServerResourcesGetAllHandlerNonIntCount(t *testing.T) {
664 req := httptest.NewRequest(http.MethodGet, "/Users?count=BadBanana", nil)
665 rr := httptest.NewRecorder()
666 newTestServer().ServeHTTP(rr, req)
667
668 assertEqualStatusCode(t, http.StatusBadRequest, rr.Code)
669
670 var response errors.ScimError
671 assertUnmarshalNoError(t, json.Unmarshal(rr.Body.Bytes(), &response))
672 assertEqual(t, http.StatusBadRequest, response.Status)
673 assertEqual(t, "Bad Request. Invalid parameter provided in request: count.", response.Detail)
674}
675
676func TestServerResourcesGetAllHandlerNonIntStartIndex(t *testing.T) {
677 req := httptest.NewRequest(http.MethodGet, "/Users?startIndex=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…