Skip to content

Commit

Permalink
✅ [placeholder-plain] Cover the addition of appName
Browse files Browse the repository at this point in the history
  • Loading branch information
vbuch committed Jan 11, 2024
1 parent cb651c3 commit e5ec261
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/placeholder-plain/src/plainAddPlaceholder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,20 @@ describe(plainAddPlaceholder, () => {
expect(output).toBeInstanceOf(Buffer);
expect(output.indexOf('/Rect [100 100 200 200]')).not.toBe(-1);
});

it('sets the Prop_Build dictionary for the signature', async () => {
const input = readTestResource('w3dummy.pdf');
const output = plainAddPlaceholder({
pdfBuffer: input,
reason: 'Because I can',
location: 'some place',
name: 'example name',
contactInfo: '[email protected]',
widgetRect: [100, 100, 200, 200],
appName: 'app-name-signpdf',
});
expect(output).toBeInstanceOf(Buffer);
expect(output.indexOf('/Name /Adobe.PPKLite')).not.toBe(-1);
expect(output.indexOf('/Name /app-name-signpdf')).not.toBe(-1);
});
});

0 comments on commit e5ec261

Please sign in to comment.