production runtime and mock removal

This commit is contained in:
inman committed 2026-08-17 23:44:14 +08:00
1 parent 2ef3da7af5
commit 6480e503eb
55 files changed
+581 -540

No files matched your search

+4
View File
@@ -87,6 +87,10 @@ func TestBillingAdminRoutesRequireSuperAdminAndValidateWrites(t *testing.T) {
if got.Code != 200 || service.adjustment.AmountFen != 124 || service.adjustment.DeltaFen != -124 || service.adjustment.OperatorID != "root" {
t.Fatalf("adjustment status=%d got=%+v body=%s", got.Code, service.adjustment, got.Body.String())
}
got = serveJSON(t, super, http.MethodPost, "/api/admin/billing/adjustments", map[string]any{"organizationId": "org", "amountYuan": "1.235", "direction": "credit", "note": " string amount "})
if got.Code != 200 || service.adjustment.AmountFen != 124 || service.adjustment.DeltaFen != 124 {
t.Fatalf("string adjustment status=%d got=%+v body=%s", got.Code, service.adjustment, got.Body.String())
}
var adjustmentResponse map[string]json.RawMessage
if err := json.Unmarshal(got.Body.Bytes(), &adjustmentResponse); err != nil {
t.Fatalf("decode adjustment response: %v", err)