Skip to content

Commit

Permalink
Added test for ZeptoMail API version check
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-naik committed Oct 19, 2024
1 parent 82aa4f8 commit 54358f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/ApiMailAdapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@ describe('ApiMailAdapter', () => {
expect(payload.textbody).toBe(examplePayload.text);
expect(payload.htmlbody).toBe(examplePayload.html);
});

it('throws if unsupported version', () => {
expect(() => converter.zeptomail({ api: '1.2', payload: examplePayload})).toThrow();
expect(() => converter.zeptomail({ api: '1.1', payload: examplePayload})).not.toThrow();
});
});
});

Expand Down

0 comments on commit 54358f3

Please sign in to comment.