@@ -34,7 +34,7 @@ describe('Unit: Commands > Update', function () {
34
34
const runCommandStub = sinon . stub ( cmdInstance , 'runCommand' ) . resolves ( ) ;
35
35
36
36
return cmdInstance . run ( { version : '1.0.0' , force : false , zip : '' } ) . then ( ( ) => {
37
- expect ( runCommandStub . calledOnce ) . to . be . true ;
37
+ expect ( runCommandStub . calledTwice ) . to . be . true ;
38
38
expect ( ui . run . calledOnce ) . to . be . true ;
39
39
expect ( versionStub . calledOnce ) . to . be . true ;
40
40
expect ( versionStub . args [ 0 ] [ 0 ] ) . to . deep . equal ( {
@@ -77,7 +77,7 @@ describe('Unit: Commands > Update', function () {
77
77
return cmdInstance . run ( { rollback : true } ) . then ( ( ) => {
78
78
expect ( false , 'error should have been thrown' ) . to . be . true ;
79
79
} ) . catch ( ( error ) => {
80
- expect ( runCommandStub . calledOnce ) . to . be . false ;
80
+ expect ( runCommandStub . called ) . to . be . false ;
81
81
expect ( error ) . to . be . an . instanceof ( Error ) ;
82
82
expect ( error . message ) . to . equal ( 'No previous version found' ) ;
83
83
expect ( ui . run . called ) . to . be . false ;
@@ -109,7 +109,7 @@ describe('Unit: Commands > Update', function () {
109
109
const cwdStub = sinon . stub ( process , 'cwd' ) . returns ( fakeInstance . dir ) ;
110
110
111
111
return cmdInstance . run ( { rollback : true , force : false , zip : '' } ) . then ( ( ) => {
112
- expect ( runCommandStub . calledOnce ) . to . be . true ;
112
+ expect ( runCommandStub . calledTwice ) . to . be . true ;
113
113
cwdStub . restore ( ) ;
114
114
115
115
expect ( ui . run . calledOnce ) . to . be . true ;
@@ -172,7 +172,7 @@ describe('Unit: Commands > Update', function () {
172
172
return cmdInstance . run ( { version : '1.1.0' , rollback : false , force : false , restart : true } ) . then ( ( ) => {
173
173
cwdStub . restore ( ) ;
174
174
175
- expect ( runCommandStub . calledOnce ) . to . be . true ;
175
+ expect ( runCommandStub . calledTwice ) . to . be . true ;
176
176
expect ( ui . run . calledOnce ) . to . be . true ;
177
177
expect ( versionStub . calledOnce ) . to . be . true ;
178
178
expect ( ui . log . called ) . to . be . false ;
@@ -238,7 +238,7 @@ describe('Unit: Commands > Update', function () {
238
238
zip : ''
239
239
} ;
240
240
241
- expect ( runCommandStub . calledOnce ) . to . be . true ;
241
+ expect ( runCommandStub . calledTwice ) . to . be . true ;
242
242
expect ( ui . run . calledOnce ) . to . be . true ;
243
243
expect ( versionStub . calledOnce ) . to . be . true ;
244
244
expect ( versionStub . args [ 0 ] [ 0 ] ) . to . deep . equal ( expectedCtx ) ;
@@ -301,7 +301,7 @@ describe('Unit: Commands > Update', function () {
301
301
zip : ''
302
302
} ;
303
303
304
- expect ( runCommandStub . calledOnce ) . to . be . true ;
304
+ expect ( runCommandStub . calledTwice ) . to . be . true ;
305
305
expect ( ui . run . calledOnce ) . to . be . true ;
306
306
expect ( versionStub . calledOnce ) . to . be . true ;
307
307
expect ( versionStub . args [ 0 ] [ 0 ] ) . to . deep . equal ( expectedCtx ) ;
0 commit comments