Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Sep 4, 2020
1 parent cb60e13 commit c070dc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function isPngJob(job: TaskPayloadPNG | TaskPayloadPDF): job is TaskPayloadPNG {
return (job as TaskPayloadPNG).relativeUrl !== undefined;
}
function isPdfJob(job: TaskPayloadPNG | TaskPayloadPDF): job is TaskPayloadPDF {
return (job as TaskPayloadPDF).relativeUrls !== undefined;
return (job as TaskPayloadPDF).objects !== undefined; // 7.x only
}

export function getFullUrls<TaskPayloadType>({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ test(`returns content_type of application/pdf`, async () => {

const { content_type: contentType } = await runTask(
'pdfJobId',
getScheduledTaskParams({ objects: [], timeRange: {}, headers: encryptedHeaders }), // 7.x and below only
getBasePayload({ objects: [], timeRange: {}, headers: encryptedHeaders }), // 7.x and below only
cancellationToken
);
expect(contentType).toBe('application/pdf');
Expand All @@ -121,7 +121,7 @@ test(`returns content of generatePdf getBuffer base64 encoded`, async () => {
const encryptedHeaders = await encryptHeaders({});
const { content } = await runTask(
'pdfJobId',
getScheduledTaskParams({ objects: [], timeRange: {}, headers: encryptedHeaders }), // 7.x and below only
getBasePayload({ objects: [], timeRange: {}, headers: encryptedHeaders }), // 7.x and below only
cancellationToken
);

Expand Down

0 comments on commit c070dc2

Please sign in to comment.