2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-20 20:00:36 +03:00

Merge pull request #15496 from twbs/15484-alternative

Make $(document).tooltip({...}) without a `selector` throw an error
This commit is contained in:
Chris Rebert
2015-01-28 11:05:40 -08:00
3 changed files with 17 additions and 0 deletions
+7
View File
@@ -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!'))
})
})