@@ -71,44 +71,53 @@ describe('uiTinymce', function () {
71
71
done ( ) ;
72
72
} ) ;
73
73
} ) ;
74
- /*
74
+
75
75
describe ( 'setting a value to the model' , function ( ) {
76
- it('should update the editor', function() {
76
+ it ( 'should update the editor' , function ( done ) {
77
77
compile ( ) ;
78
- runs (function () {
79
- scope.$apply(function() {
80
- scope.foo = text ;
81
- });
78
+ setTimeout ( function ( ) {
79
+ scope . foo = text ;
80
+ scope . $apply ( ) ;
81
+
82
82
expect ( tinymce . get ( 'foo' ) . getContent ( ) ) . toEqual ( text ) ;
83
+
84
+ done ( ) ;
83
85
} ) ;
84
86
} ) ;
85
- it('should handle undefined gracefully', function( ) {
87
+ it ( 'should handle undefined gracefully' , function ( done ) {
86
88
compile ( ) ;
87
- runs (function () {
88
- scope.$apply(function() {
89
- scope.foo = undefined ;
90
- });
89
+ setTimeout ( function ( ) {
90
+ scope . foo = undefined ;
91
+ scope . $apply ( ) ;
92
+
91
93
expect ( tinymce . get ( 'foo' ) . getContent ( ) ) . toEqual ( '' ) ;
94
+
95
+ done ( ) ;
92
96
} ) ;
93
97
} ) ;
94
- it('should handle null gracefully', function( ) {
98
+ it ( 'should handle null gracefully' , function ( done ) {
95
99
compile ( ) ;
96
- runs (function () {
97
- scope.$apply(function() {
98
- scope.foo = null ;
99
- });
100
+ setTimeout ( function ( ) {
101
+ scope . foo = null ;
102
+ scope . $apply ( ) ;
103
+
100
104
expect ( tinymce . get ( 'foo' ) . getContent ( ) ) . toEqual ( '' ) ;
105
+
106
+ done ( ) ;
101
107
} ) ;
102
108
} ) ;
103
109
} ) ;
104
- describe('using the editor', function () {
105
- it('should update the model', function( ) {
110
+ /* describe('using the editor', function () {
111
+ it('should update the model', function (done ) {
106
112
compile();
107
- runs (function () {
113
+ setTimeout (function () {
108
114
tinymce.get('foo').setContent(text);
115
+
109
116
expect(scope.foo).toEqual(text);
117
+
118
+ done();
110
119
});
111
120
});
112
- });
113
- */
121
+ });*/
122
+
114
123
} ) ;
0 commit comments