diff options
Diffstat (limited to 'js/tests')
| -rw-r--r-- | js/tests/unit/popover.js | 7 | ||||
| -rw-r--r-- | js/tests/unit/tooltip.js | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index e1a2edef7..b18366a7e 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -225,4 +225,11 @@ $(function () { }) .bootstrapPopover('show') }) + + test('should throw an error when initializing popover on the document object without specifying a delegation selector', function () { + throws(function () { + $(document).bootstrapPopover({ title: 'What am I on?', content: 'My selector is missing' }) + }, new Error('`selector` option must be specified when initializing popover on the window.document object!')) + }) + }) diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 2264ca372..32892f12b 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -1107,4 +1107,10 @@ $(function () { $element.bootstrapTooltip('show') }) + test('should throw an error when initializing tooltip on the document object without specifying a delegation selector', function () { + throws(function () { + $(document).bootstrapTooltip({ title: 'What am I on?' }) + }, new Error('`selector` option must be specified when initializing tooltip on the window.document object!')) + }) + }) |
