@@ -37,12 +37,12 @@ describe( 'ImageUploadCommand', () => {
37
37
} ) ;
38
38
} ) ;
39
39
40
- describe ( '_doExecute ' , ( ) => {
40
+ describe ( 'execute() ' , ( ) => {
41
41
it ( 'should insert image' , ( ) => {
42
42
const file = createNativeFileMock ( ) ;
43
43
setModelData ( document , '<paragraph>[]foo</paragraph>' ) ;
44
44
45
- command . _doExecute ( { file } ) ;
45
+ command . execute ( { file } ) ;
46
46
47
47
const id = fileRepository . getLoader ( file ) . id ;
48
48
expect ( getModelData ( document ) ) . to . equal ( `[<image uploadId="${ id } "></image>]<paragraph>foo</paragraph>` ) ;
@@ -52,7 +52,7 @@ describe( 'ImageUploadCommand', () => {
52
52
const file = createNativeFileMock ( ) ;
53
53
setModelData ( document , '<paragraph>foo[]</paragraph>' ) ;
54
54
55
- command . _doExecute ( { file } ) ;
55
+ command . execute ( { file } ) ;
56
56
57
57
const id = fileRepository . getLoader ( file ) . id ;
58
58
expect ( getModelData ( document ) ) . to . equal ( `<paragraph>foo</paragraph>[<image uploadId="${ id } "></image>]` ) ;
@@ -62,7 +62,7 @@ describe( 'ImageUploadCommand', () => {
62
62
const file = createNativeFileMock ( ) ;
63
63
setModelData ( document , '<paragraph>f{}oo</paragraph>' ) ;
64
64
65
- command . _doExecute ( { file } ) ;
65
+ command . execute ( { file } ) ;
66
66
67
67
const id = fileRepository . getLoader ( file ) . id ;
68
68
expect ( getModelData ( document ) ) . to . equal ( `[<image uploadId="${ id } "></image>]<paragraph>foo</paragraph>` ) ;
@@ -72,7 +72,7 @@ describe( 'ImageUploadCommand', () => {
72
72
const file = createNativeFileMock ( ) ;
73
73
setModelData ( document , '[<image src="image.png"></image>]' ) ;
74
74
75
- command . _doExecute ( { file } ) ;
75
+ command . execute ( { file } ) ;
76
76
77
77
const id = fileRepository . getLoader ( file ) . id ;
78
78
expect ( getModelData ( document ) ) . to . equal ( `<image src="image.png"></image>[<image uploadId="${ id } "></image>]` ) ;
@@ -88,7 +88,7 @@ describe( 'ImageUploadCommand', () => {
88
88
89
89
setModelData ( document , '<other>[]</other>' ) ;
90
90
91
- command . _doExecute ( { file } ) ;
91
+ command . execute ( { file } ) ;
92
92
93
93
expect ( getModelData ( document ) ) . to . equal ( '<other>[]</other>' ) ;
94
94
} ) ;
@@ -97,7 +97,7 @@ describe( 'ImageUploadCommand', () => {
97
97
const file = createNativeFileMock ( ) ;
98
98
file . type = 'audio/mpeg3' ;
99
99
setModelData ( document , '<paragraph>foo[]</paragraph>' ) ;
100
- command . _doExecute ( { file } ) ;
100
+ command . execute ( { file } ) ;
101
101
102
102
expect ( getModelData ( document ) ) . to . equal ( '<paragraph>foo[]</paragraph>' ) ;
103
103
} ) ;
@@ -109,7 +109,7 @@ describe( 'ImageUploadCommand', () => {
109
109
110
110
setModelData ( document , '<paragraph>[]foo</paragraph>' ) ;
111
111
112
- command . _doExecute ( { batch, file } ) ;
112
+ command . execute ( { batch, file } ) ;
113
113
const id = fileRepository . getLoader ( file ) . id ;
114
114
115
115
expect ( getModelData ( document ) ) . to . equal ( `[<image uploadId="${ id } "></image>]<paragraph>foo</paragraph>` ) ;
0 commit comments