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

Function TestServerResourcesGetAllHandlerNonIntStartIndex

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

Source from the content-addressed store, hash-verified

674}
675
676func TestServerResourcesGetAllHandlerNonIntStartIndex(t *testing.T) {
677 req := httptest.NewRequest(http.MethodGet, "/Users?startIndex=BadBanana", nil)
678 rr := httptest.NewRecorder()
679 newTestServer().ServeHTTP(rr, req)
680
681 assertEqualStatusCode(t, http.StatusBadRequest, rr.Code)
682
683 var response errors.ScimError
684 assertUnmarshalNoError(t, json.Unmarshal(rr.Body.Bytes(), &response))
685 assertEqual(t, http.StatusBadRequest, response.Status)
686 assertEqual(t, "Bad Request. Invalid parameter provided in request: startIndex.", response.Detail)
687}
688
689func TestServerResourcesGetHandler(t *testing.T) {
690 req := httptest.NewRequest(http.MethodGet, "/Users", 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…