Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
asein-sinch committed Aug 19, 2024
1 parent 1dbf86d commit 8443611
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ export class ExceptionResponse<
);
} else if (!res) {
res = {} as V;
if (context.response.status !== 204 && context.response.status !== 200) {
if (context.response.status !== 204
&& context.response.status !== 200
&& context.response.status !== 202
) {
res = {} as V;
error = new EmptyResponseError<V>(
context.response.statusText,
Expand Down
16 changes: 16 additions & 0 deletions packages/sms/tests/rest/v1/batches/batches.steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ let listResponse: PageResult<Sms.SendSMSResponse>;
let batchesList: Sms.SendSMSResponse[];
let pagesIteration: number;
let batch: Sms.SendSMSResponse;
let deliveryFeedbackResponse: void;

Given('the SMS service "Batches" is available', () => {
const smsService = new SmsService({
Expand Down Expand Up @@ -239,3 +240,18 @@ Then('the response contains the SMS batch details with a cancelled status', () =
assert.equal(batch.id, '01W4FFL35P4NC4K35SMSBATCH1');
assert.equal(batch.canceled, true);
});

When('I send a request to send delivery feedbacks', async () => {
deliveryFeedbackResponse = await batchesApi.sendDeliveryFeedback({
batch_id: '01W4FFL35P4NC4K35SMSBATCH1',
deliveryFeedbackRequestBody: {
recipients: [
'+12017777777',
],
},
});
});

Then('the delivery feedback response contains no data', () => {
assert.deepEqual(deliveryFeedbackResponse, {});
});

0 comments on commit 8443611

Please sign in to comment.