MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / TestCreateMatchingRule

Function TestCreateMatchingRule

api/reconciliation_api_test.go:107–120  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestCreateMatchingRule(t *testing.T) {
108 router, _, err := setupRouter(t)
109 if err != nil {
110 t.Fatalf("Failed to setup router: %v", err)
111 }
112
113 t.Run("Invalid JSON", func(t *testing.T) {
114 req := httptest.NewRequest("POST", "/reconciliation/matching-rules", bytes.NewReader([]byte("invalid json")))
115 req.Header.Set("Content-Type", "application/json")
116 resp := httptest.NewRecorder()
117 router.ServeHTTP(resp, req)
118 assert.Equal(t, http.StatusBadRequest, resp.Code)
119 })
120}
121
122func TestUpdateMatchingRule(t *testing.T) {
123 router, _, err := setupRouter(t)

Callers

nothing calls this directly

Calls 2

setupRouterFunction · 0.85
SetMethod · 0.65

Tested by

no test coverage detected