Remove platform tenancy from SXCHNGE customer BFF (#34)
This commit is contained in:
1 parent
7062672a87
commit
981e84a4b4
244 files changed
+651
-17130
No files matched your search
@@ -24,21 +24,6 @@ func TestAutoMapsServiceUnavailable(t *testing.T) {
|
||||
require.True(t, strings.Contains(recorder.Body.String(), "service_unavailable"))
|
||||
}
|
||||
|
||||
func TestAutoMapsDocumentsReportOwned(t *testing.T) {
|
||||
req := httptest.NewRequestWithContext(context.Background(), http.MethodPut, "/reports", nil)
|
||||
recorder := httptest.NewRecorder()
|
||||
|
||||
Auto(zap.NewNop(), mservice.Type("documents_report"), merrors.DocumentsReportOwned("report has an active payout")).ServeHTTP(recorder, req)
|
||||
|
||||
var payload struct {
|
||||
Data ErrorResponse `json:"data"`
|
||||
}
|
||||
require.NoError(t, json.Unmarshal(recorder.Body.Bytes(), &payload))
|
||||
require.Equal(t, http.StatusConflict, recorder.Code)
|
||||
require.Equal(t, "documents_report_owned", payload.Data.Error)
|
||||
require.Equal(t, "report has an active payout", payload.Data.Details)
|
||||
}
|
||||
|
||||
func TestErrorWithDetailsPreservesStructuredPayload(t *testing.T) {
|
||||
req := httptest.NewRequestWithContext(context.Background(), http.MethodPost, "/actions", nil)
|
||||
recorder := httptest.NewRecorder()
|
||||
|
||||
Reference in new issue
Block a user