Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmcroft committed Oct 4, 2023
1 parent e90abba commit b1b52f7
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tests/FuturePayService.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ describe("when initiating an agreement", () => {
var agreement = regularAgreement();

// Act
var formInputsHtml = await futurePayService.initiateAgreement(agreement, "https://www.example.com");
var formInputsHtml = await futurePayService.initiateAgreement(agreement, {
callbackUrl: "https://www.example.com", additionalProperties: null, openInNewTab: false
});

// Assert
expect(formInputsHtml).not.toBeNull();
Expand All @@ -51,7 +53,9 @@ describe("when initiating an agreement", () => {
var agreement = regularAgreement();

// Act
var formInputsHtml = await futurePayService.initiateAgreement(agreement, null, { C_test: "C", M_test: "M", MC_test: "MC", CM_test: "CM" });
var formInputsHtml = await futurePayService.initiateAgreement(agreement, {
callbackUrl: null, additionalProperties: { C_test: "C", M_test: "M", MC_test: "MC", CM_test: "CM" }, openInNewTab: false
});

// Assert
expect(formInputsHtml).not.toBeNull();
Expand All @@ -68,7 +72,9 @@ describe("when initiating an agreement", () => {
var agreement = regularAgreement();

// Act
var formInputsHtml = await futurePayService.initiateAgreement(agreement, null, { VAR_test: "test" });
var formInputsHtml = await futurePayService.initiateAgreement(agreement, {
callbackUrl: null, additionalProperties: { VAR_test: "test" }, openInNewTab: false
});

// Assert
expect(formInputsHtml).not.toBeNull();
Expand Down Expand Up @@ -102,7 +108,9 @@ describe("when cancelling an agreement", () => {
var agreement = cancelAgreement();

// Act
var formInputsHtml = await futurePayService.cancelAgreement(agreement, "https://www.example.com");
var formInputsHtml = await futurePayService.cancelAgreement(agreement, {
callbackUrl: "https://www.example.com", additionalProperties: null, openInNewTab: false
});

// Assert
expect(formInputsHtml).not.toBeNull();
Expand All @@ -116,7 +124,9 @@ describe("when cancelling an agreement", () => {
var agreement = cancelAgreement();

// Act
var formInputsHtml = await futurePayService.cancelAgreement(agreement, null, { C_test: "C", M_test: "M", MC_test: "MC", CM_test: "CM" });
var formInputsHtml = await futurePayService.cancelAgreement(agreement, {
callbackUrl: null, additionalProperties: { C_test: "C", M_test: "M", MC_test: "MC", CM_test: "CM" }, openInNewTab: false
});

// Assert
expect(formInputsHtml).not.toBeNull();
Expand All @@ -133,7 +143,9 @@ describe("when cancelling an agreement", () => {
var agreement = cancelAgreement();

// Act
var formInputsHtml = await futurePayService.cancelAgreement(agreement, null, { VAR_test: "test" });
var formInputsHtml = await futurePayService.cancelAgreement(agreement, {
callbackUrl: null, additionalProperties: { VAR_test: "test" }, openInNewTab: false
});

// Assert
expect(formInputsHtml).not.toBeNull();
Expand Down

0 comments on commit b1b52f7

Please sign in to comment.