diff --git a/src/modal/test/modal.spec.js b/src/modal/test/modal.spec.js index 0619d4e05..401b3c293 100644 --- a/src/modal/test/modal.spec.js +++ b/src/modal/test/modal.spec.js @@ -76,6 +76,10 @@ describe('modal', function() { 'options-template': { scope: {modal: {title: 'Title', content: 'Hello Modal!', counter: 0}, items: ['foo', 'bar', 'baz']}, element: 'click me' + }, + 'options-contentTemplate': { + scope: {modal: {title: 'Title', content: 'Hello Modal!', counter: 0}, items: ['foo', 'bar', 'baz']}, + element: 'click me' } }; @@ -585,6 +589,17 @@ describe('modal', function() { }); + describe('contentTemplate', function() { + + it('should support custom contentTemplate', function() { + $templateCache.put('custom', 'baz: {{title}}'); + var elm = compileDirective('options-contentTemplate'); + angular.element(elm[0]).triggerHandler('click'); + expect(sandboxEl.find('.modal-body').text()).toBe('baz: ' + scope.modal.title); + }); + + }); + describe('container', function() { it('accepts element object', function() { var testElm = angular.element('
');