@@ -41,6 +41,7 @@ describe('hlx publish', () => {
4141 mockPublish . withGithubToken . returnsThis ( ) ;
4242 mockPublish . withFilter . returnsThis ( ) ;
4343 mockPublish . withCustomVCLs . returnsThis ( ) ;
44+ mockPublish . withDispatchVersion . returnsThis ( ) ;
4445 mockPublish . run . returnsThis ( ) ;
4546 } ) ;
4647
@@ -73,6 +74,7 @@ describe('hlx publish', () => {
7374 sinon . assert . calledWith ( mockPublish . withPublishAPI , 'foobar.api' ) ;
7475 sinon . assert . calledWith ( mockPublish . withDryRun , true ) ;
7576 sinon . assert . calledWith ( mockPublish . withCustomVCLs , [ ] ) ;
77+ sinon . assert . calledWith ( mockPublish . withDispatchVersion , undefined ) ;
7678 } ) ;
7779
7880 it ( 'hlx publish works with minimal arguments' , ( ) => {
@@ -91,6 +93,7 @@ describe('hlx publish', () => {
9193 sinon . assert . calledWith ( mockPublish . withFastlyNamespace , 'hlx' ) ; // TODO !!
9294 sinon . assert . calledWith ( mockPublish . withFastlyAuth , 'secret-key' ) ;
9395 sinon . assert . calledWith ( mockPublish . withCustomVCLs , [ ] ) ;
96+ sinon . assert . calledWith ( mockPublish . withDispatchVersion , undefined ) ;
9497 sinon . assert . calledOnce ( mockPublish . run ) ;
9598 } ) ;
9699
@@ -128,4 +131,18 @@ describe('hlx publish', () => {
128131
129132 assert . fail ( 'publish w/o github token should fail.' ) ;
130133 } ) ;
134+
135+ it ( 'hlx publish handles dispatch-version' , ( ) => {
136+ new CLI ( )
137+ . withCommandExecutor ( 'publish' , mockPublish )
138+ . run ( [ 'publish' ,
139+ '--wsk-auth' , 'secret-key' ,
140+ '--wsk-namespace' , 'hlx' ,
141+ '--fastly-auth' , 'secret-key' ,
142+ '--fastly-namespace' , 'hlx' ,
143+ '--dispatch-version' , 'ci1' ,
144+ ] ) ;
145+
146+ sinon . assert . calledWith ( mockPublish . withDispatchVersion , 'ci1' ) ;
147+ } ) ;
131148} ) ;
0 commit comments