From 8976ebe28ed60861eb357aa923ada89b9c0c967a Mon Sep 17 00:00:00 2001 From: woodser <13068859+woodser@users.noreply.github.com> Date: Thu, 19 Jun 2025 16:05:49 -0400 Subject: [PATCH] test swish payment account over grpc api --- src/HavenoClient.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/HavenoClient.test.ts b/src/HavenoClient.test.ts index 7f77438a..6ef758dd 100644 --- a/src/HavenoClient.test.ts +++ b/src/HavenoClient.test.ts @@ -4734,6 +4734,12 @@ function testPaymentAccount(account: PaymentAccount, form: PaymentAccountForm) { expect(account.getPaymentAccountPayload()!.getAliPayAccountPayload()!.getAccountNr()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.ACCOUNT_NR).getValue()); expect(account.getTradeCurrenciesList().map(currency => currency.getCode()).join(",")).toEqual(getFormField(form, PaymentAccountFormField.FieldId.TRADE_CURRENCIES).getValue()); break; + case PaymentAccountForm.FormId.SWISH: + expect(account.getPaymentAccountPayload()!.getSwishAccountPayload()!.getHolderName()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.HOLDER_NAME).getValue()); + expect(account.getPaymentAccountPayload()!.getSwishAccountPayload()!.getMobileNr()).toEqual(getFormField(form, PaymentAccountFormField.FieldId.MOBILE_NR).getValue()); + expect(account.getTradeCurrenciesList().length).toEqual(1); + expect(account.getTradeCurrenciesList()[0].getCode()).toEqual("SEK"); + break; default: throw new Error("Unhandled payment method type: " + form.getId()); }