Bankkonto-Aktualisierung über zentralen Dienst reparieren
All checks were successful
Build and Push Docker Images / build-website (push) Successful in 23s
Build and Push Docker Images / build-central-services-admin (push) Successful in 22s
Build and Push Docker Images / build-docs (push) Successful in 22s
Build and Push Docker Images / build-backend (push) Successful in 44s
Build and Push Docker Images / build-frontend (push) Successful in 1m13s
Build and Push Docker Images / build-central-services-api (push) Successful in 21s
All checks were successful
Build and Push Docker Images / build-website (push) Successful in 23s
Build and Push Docker Images / build-central-services-admin (push) Successful in 22s
Build and Push Docker Images / build-docs (push) Successful in 22s
Build and Push Docker Images / build-backend (push) Successful in 44s
Build and Push Docker Images / build-frontend (push) Successful in 1m13s
Build and Push Docker Images / build-central-services-api (push) Successful in 21s
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import test from "node:test"
|
||||
import assert from "node:assert/strict"
|
||||
|
||||
import { getBankAccountOwnerName } from "../src/modules/cron/bankstatementsync.service"
|
||||
import {
|
||||
getBankAccountOwnerName,
|
||||
isExpiredBankingError,
|
||||
} from "../src/modules/cron/bankstatementsync.service"
|
||||
|
||||
test("reads the GoCardless owner_name for a bank account", () => {
|
||||
assert.equal(
|
||||
@@ -15,3 +18,9 @@ test("does not overwrite the stored owner with an empty provider value", () => {
|
||||
assert.equal(getBankAccountOwnerName({}), null)
|
||||
assert.equal(getBankAccountOwnerName(null), null)
|
||||
})
|
||||
|
||||
test("recognizes expired EUA errors from direct and central banking responses", () => {
|
||||
assert.equal(isExpiredBankingError({ response: { data: { detail: "EUA was valid for 90 days and it expired" } } }), true)
|
||||
assert.equal(isExpiredBankingError(new Error("EUA was valid for 90 days and it expired")), true)
|
||||
assert.equal(isExpiredBankingError({ response: { data: { message: "temporary provider error" } } }), false)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user