Skip to content

Commit 20f7294

Browse files
test: update SendingDomains test to reflect changes in setup instructions endpoint and response handling
1 parent 977a9d9 commit 20f7294

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/__tests__/lib/api/resources/SendingDomains.test.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,22 +215,19 @@ describe("lib/api/SendingDomains: ", () => {
215215
it("should send setup instructions for a sending domain.", async () => {
216216
const sendingDomainId = 999;
217217
const email = "[email protected]";
218-
const mockResponse: SetupInstructionsResponse = {
219-
message: "Setup instructions sent successfully.",
220-
};
221218

222219
mock
223220
.onPost(
224-
`https://mailtrap.io/api/accounts/${testAccountId}/sending_domains/${sendingDomainId}/setup_instructions`
221+
`https://mailtrap.io/api/accounts/${testAccountId}/sending_domains/${sendingDomainId}/send_setup_instructions`
225222
)
226-
.reply(200, mockResponse);
223+
.reply(204);
227224

228225
const result = await sendingDomainsAPI.sendSetupInstructions(
229226
sendingDomainId,
230227
email
231228
);
232229

233-
expect(result).toEqual(mockResponse);
230+
expect(result).toBeUndefined();
234231
});
235232
});
236233
});

0 commit comments

Comments
 (0)