(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func 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 | |
| 126 | func TestServerResourceGetHandler(t *testing.T) { |
| 127 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…