File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,9 @@ describe('uiTinymce', function () {
22
22
*/
23
23
function compile ( ) {
24
24
runs ( function ( ) {
25
- element = $compile ( '<form><textarea id="foo" ui-tinymce="{foo: \'bar\'}" ng-model="foo"></textarea></form>' ) ( scope ) ;
25
+ element = $compile ( '<form><textarea id="foo" ui-tinymce="{foo: \'bar\', setup: setupFooBar() }" ng-model="foo"></textarea></form>' ) ( scope ) ;
26
26
} ) ;
27
+ scope . $apply ( ) ;
27
28
waits ( 1 ) ;
28
29
}
29
30
@@ -46,6 +47,14 @@ describe('uiTinymce', function () {
46
47
expect ( tinymce . init . mostRecentCall . args [ 0 ] . tinymce . bar ) . toEqual ( 'baz' ) ;
47
48
} ) ;
48
49
} ) ;
50
+
51
+ it ( 'should execute the passed `setup` option' , function ( ) {
52
+ scope . setupFooBar = jasmine . createSpy ( 'setupFooBar' ) ;
53
+ compile ( ) ;
54
+ runs ( function ( ) {
55
+ expect ( scope . setupFooBar ) . toHaveBeenCalled ( ) ;
56
+ } ) ;
57
+ } ) ;
49
58
} ) ;
50
59
/*
51
60
describe('setting a value to the model', function () {
@@ -87,4 +96,4 @@ describe('uiTinymce', function () {
87
96
});
88
97
});
89
98
*/
90
- } ) ;
99
+ } ) ;
You can’t perform that action at this time.
0 commit comments