better import csv error

This commit is contained in:
Lars Nolden
2026-09-11 15:30:28 +02:00
parent 41af06f718
commit 6f791b1277
2 changed files with 55 additions and 8 deletions
+3 -2
View File
@@ -241,8 +241,9 @@ func TestCrossSourceExactMatchAndUncertainty(t *testing.T) {
}
api.RawDescription = "Different bank text"
matched, err = NormalizeAndDedupe(d, []domain.Facts{api})
if err == nil || matched != nil {
t.Fatal("uncertain overlap was silently counted")
const wantConflict = "bank-synced and CSV transactions overlap on 2026-09-01 for -12.30 EUR but differ in description (bank-synced \"Different bank text\"; CSV \"Lunch\"). Finance Duck cannot tell whether they are one transaction or two; to prevent double counting, nothing was imported. Compare both records, then correct or remove the duplicate before retrying"
if err == nil || err.Error() != wantConflict || matched != nil {
t.Fatalf("unexpected cross-source conflict: %v %+v", err, matched)
}
api.RawDescription = csv.RawDescription
b := api