fix: add missing err checks and fix loop termination in tests

This commit is contained in:
2026-07-10 12:03:11 +01:00
parent cf0cd8de15
commit d1e85bb855
4 changed files with 18 additions and 1 deletions
+3
View File
@@ -3357,6 +3357,9 @@ func TestVAT_RoundingConsistency(t *testing.T) {
var netAmount sql.NullFloat64
var isVATApplicable bool
err = tx.QueryRow(ctx, `SELECT is_vat_applicable, vat_amount, net_amount FROM payments WHERE id = $1`, paymentID).Scan(&isVATApplicable, &vatAmount, &netAmount)
if err != nil {
t.Fatalf("failed to query payment VAT fields: %v", err)
}
if !isVATApplicable {
t.Fatal("expected VAT to be applicable")