@@ -376,12 +376,28 @@ describe('taExecCommand', function(){
376
376
} ) ) ;
377
377
it ( 'to ol' , inject ( function ( taSelection , taExecCommand ) {
378
378
taExecCommand ( ) ( 'insertorderedlist' , false , null ) ;
379
- expect ( insertedHtml ) . toBe ( '<ol></ol> ' ) ;
379
+ expect ( insertedHtml ) . toBe ( '' ) ;
380
380
} ) ) ;
381
381
382
382
it ( 'to ul' , inject ( function ( taSelection , taExecCommand ) {
383
383
taExecCommand ( ) ( 'insertunorderedlist' , false , null ) ;
384
- expect ( insertedHtml ) . toBe ( '<ul></ul>' ) ;
384
+ expect ( insertedHtml ) . toBe ( '' ) ;
385
+ } ) ) ;
386
+ } ) ;
387
+ describe ( 'text-only ta-bind' , function ( ) {
388
+ beforeEach ( inject ( function ( taSelection ) {
389
+ element = angular . element ( '<div class="ta-bind">testsomecontent</div>' ) ;
390
+ taSelection . element = element [ 0 ] ;
391
+ taSelection . getOnlySelectedElements = function ( ) { return [ ] ; } ;
392
+ } ) ) ;
393
+ it ( 'to ol' , inject ( function ( taSelection , taExecCommand ) {
394
+ taExecCommand ( ) ( 'insertorderedlist' , false , null ) ;
395
+ expect ( element . html ( ) ) . toBe ( '<ol><li>testsomecontent</li></ol>' ) ;
396
+ } ) ) ;
397
+
398
+ it ( 'to ul' , inject ( function ( taSelection , taExecCommand ) {
399
+ taExecCommand ( ) ( 'insertunorderedlist' , false , null ) ;
400
+ expect ( element . html ( ) ) . toBe ( '<ul><li>testsomecontent</li></ul>' ) ;
385
401
} ) ) ;
386
402
} ) ;
387
403
describe ( 'single element selected' , function ( ) {
0 commit comments