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

Function TestServerResourceDeleteHandlerNotFound

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

Source from the content-addressed store, hash-verified

108}
109
110func TestServerResourceDeleteHandlerNotFound(t *testing.T) {
111 req := httptest.NewRequest(http.MethodDelete, "/Users/9999", nil)
112 rr := httptest.NewRecorder()
113 newTestServer().ServeHTTP(rr, req)
114
115 assertEqualStatusCode(t, http.StatusNotFound, rr.Code)
116
117 var scimErr *errors.ScimError
118 assertUnmarshalNoError(t, json.Unmarshal(rr.Body.Bytes(), &scimErr))
119 expectedError := &errors.ScimError{
120 Status: http.StatusNotFound,
121 Detail: fmt.Sprintf("Resource %d not found.", 9999),
122 }
123 assertEqualSCIMErrors(t, expectedError, scimErr)
124}
125
126func TestServerResourceGetHandler(t *testing.T) {
127 tests := []struct {

Callers

nothing calls this directly

Calls 5

assertEqualStatusCodeFunction · 0.85
assertUnmarshalNoErrorFunction · 0.85
assertEqualSCIMErrorsFunction · 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…