Skip to content

Commit 3d20445

Browse files
fix
1 parent 018c959 commit 3d20445

2 files changed

Lines changed: 3 additions & 12 deletions

File tree

tests/component-tests/events-tests/event-subscription.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
pollUpsertLetterLogForError,
1212
} from "tests/helpers/aws-cloudwatch-helper";
1313
import { supplierDataSetup } from "tests/helpers/suppliers-setup-helper";
14-
import { pollForLetterInDb } from "tests/helpers/poll-for-letters-helper";
14+
import { pollForLetterStatus } from "tests/helpers/poll-for-letters-helper";
1515

1616
let baseUrl: string;
1717

@@ -49,7 +49,7 @@ test.describe("Event Subscription SNS Tests", () => {
4949
await supplierDataSetup(supplierId);
5050

5151
// poll for letter to be inserted in db with status PENDING
52-
const { letterStatus, statusCode } = await pollForLetterInDb(
52+
const { letterStatus, statusCode } = await pollForLetterStatus(
5353
request,
5454
supplierId,
5555
domainId,

tests/helpers/poll-for-letters-helper.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createValidRequestHeaders } from "tests/constants/request-headers";
33
import { SUPPLIER_LETTERS } from "tests/constants/api-constants";
44
import { logger } from "./pino-logger";
55

6-
async function pollForLetterStatus(
6+
export async function pollForLetterStatus(
77
request: APIRequestContext,
88
supplierId: string,
99
domainId: string,
@@ -48,12 +48,3 @@ async function pollForLetterStatus(
4848

4949
return { letterStatus, statusCode };
5050
}
51-
52-
export async function pollForLetterInDb(
53-
request: APIRequestContext,
54-
supplierId: string,
55-
domainId: string,
56-
baseUrl: string,
57-
): Promise<{ letterStatus: string | undefined; statusCode: number }> {
58-
return pollForLetterStatus(request, supplierId, domainId, baseUrl);
59-
}

0 commit comments

Comments
 (0)