Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phieronymus committed Dec 2, 2020
1 parent 109dde3 commit b681b85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/specs/ec-forms.specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("EC Forms", () => {
let ecForms: ECForms;

const recordData = generateCheckoutInfo();
const recordPathMatcher = pathToRegexMatcher(`${testEndpoint}/forms/:id`);
const recordPathMatcher = pathToRegexMatcher(`${testEndpoint}/merchants/:merchantId/forms/:id`);

beforeEach(() => {
api = new RestAPI({ endpoint: testEndpoint });
Expand All @@ -24,15 +24,15 @@ describe("EC Forms", () => {
fetchMock.restore();
});

context("GET /forms/:id", () => {
context("GET /merchants/:merchantId/forms/:id", () => {
it("should get response", async () => {
fetchMock.getOnce(recordPathMatcher, {
status: 200,
body: recordData,
headers: { "Content-Type": "application/json" },
});

await expect(ecForms.get(uuid())).to.eventually.eql(recordData);
await expect(ecForms.get(uuid(), uuid())).to.eventually.eql(recordData);
});
});
});

0 comments on commit b681b85

Please sign in to comment.