Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 9e40867

Browse files
committed
Added forgotten revision to spec
1 parent a40de59 commit 9e40867

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/tinymce.spec.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ describe('uiTinymce', function () {
2222
*/
2323
function compile() {
2424
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);
2626
});
27+
scope.$apply();
2728
waits(1);
2829
}
2930

@@ -46,6 +47,14 @@ describe('uiTinymce', function () {
4647
expect(tinymce.init.mostRecentCall.args[0].tinymce.bar).toEqual('baz');
4748
});
4849
});
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+
});
4958
});
5059
/*
5160
describe('setting a value to the model', function () {
@@ -87,4 +96,4 @@ describe('uiTinymce', function () {
8796
});
8897
});
8998
*/
90-
});
99+
});

0 commit comments

Comments
 (0)