diff --git a/src/constants.js b/src/constants.js
index f69f976..51c7ed6 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -53,7 +53,8 @@ constant('macPopoverDefaults', {
footer: false,
header: false,
title: '',
- direction: 'above left'
+ direction: 'above left',
+ refreshOn: ''
},
template: "
\
\
diff --git a/test/unit/popover.spec.js b/test/unit/popover.spec.js
index 0c501d9..bb30be2 100644
--- a/test/unit/popover.spec.js
+++ b/test/unit/popover.spec.js
@@ -12,8 +12,7 @@ describe("Popover directive", function() {
var element;
beforeEach(function () {
- var template;
- template = "
Test
";
+ var template = "
Test
";
element = $compile(template)($rootScope);
$rootScope.$digest();
});
@@ -49,6 +48,18 @@ describe("Popover directive", function() {
});
});
+ describe("popover element register", function() {
+ it('should register with refreshOn options', function() {
+ var template = "
Test
";
+ $compile(template)($rootScope);
+ $rootScope.$digest();
+
+ var testPopoverOptions = popover.registered.testPopover
+ expect(testPopoverOptions).toBeDefined();
+ expect(testPopoverOptions.refreshOn).toBe('testEvent');
+ });
+ });
+
describe("popover trigger", function () {
var trigger, $timeout;