fix: add missing err checks and fix loop termination in tests
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user