From: Kevin Sawicki Date: Tue, 4 Apr 2017 17:49:21 +0000 (-0700) Subject: Add specs for showCertificateTrustDialog option errors X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2bd47eb67262a79016edb2c9aef220ee766ba607;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Add specs for showCertificateTrustDialog option errors --- diff --git a/spec/api-dialog-spec.js b/spec/api-dialog-spec.js index 6b245c2..601e28c 100644 --- a/spec/api-dialog-spec.js +++ b/spec/api-dialog-spec.js @@ -93,4 +93,20 @@ describe('dialog module', () => { }, /Error processing argument at index 1/) }) }) + + describe('showCertificateTrustDialog', () => { + it('throws errors when the options are invalid', () => { + assert.throws(() => { + dialog.showCertificateTrustDialog() + }, /options must be an object/) + + assert.throws(() => { + dialog.showCertificateTrustDialog({}) + }, /certificate must be an object/) + + assert.throws(() => { + dialog.showCertificateTrustDialog({certificate: {}, message: false}) + }, /message must be a string/) + }) + }) })