@@ -23,7 +23,7 @@ const developmentTheme = {
2323
2424const options : RenameOptions = {
2525 development : false ,
26- newName : 'Renamed Theme' ,
26+ name : 'Renamed Theme' ,
2727 live : false ,
2828}
2929
@@ -33,10 +33,10 @@ describe('renameTheme', () => {
3333 vi . mocked ( findOrSelectTheme ) . mockResolvedValue ( developmentTheme )
3434
3535 // When
36- await renameTheme ( adminSession , { ...options , development : true } )
36+ await renameTheme ( { ...options , development : true } , adminSession )
3737
3838 // Then
39- expect ( themeUpdate ) . toBeCalledWith ( developmentTheme . id , { name : options . newName } , adminSession )
39+ expect ( themeUpdate ) . toBeCalledWith ( developmentTheme . id , { name : options . name } , adminSession )
4040 expect ( renderSuccess ) . toBeCalledWith ( {
4141 body : [ 'The theme' , "'my development theme'" , { subdued : '(#1)' } , 'was renamed to' , "'Renamed Theme'" ] ,
4242 } )
@@ -52,10 +52,10 @@ describe('renameTheme', () => {
5252 vi . mocked ( findOrSelectTheme ) . mockResolvedValue ( theme1 )
5353
5454 // When
55- await renameTheme ( adminSession , { ...options , theme : '2' } )
55+ await renameTheme ( { ...options , theme : '2' } , adminSession )
5656
5757 // Then
58- expect ( themeUpdate ) . toBeCalledWith ( theme1 . id , { name : options . newName } , adminSession )
58+ expect ( themeUpdate ) . toBeCalledWith ( theme1 . id , { name : options . name } , adminSession )
5959 expect ( renderSuccess ) . toBeCalledWith ( {
6060 body : [ 'The theme' , "'my theme'" , { subdued : '(#2)' } , 'was renamed to' , "'Renamed Theme'" ] ,
6161 } )
@@ -71,10 +71,10 @@ describe('renameTheme', () => {
7171 vi . mocked ( findOrSelectTheme ) . mockResolvedValue ( theme1 )
7272
7373 // When
74- await renameTheme ( adminSession , { ...options , live : true } )
74+ await renameTheme ( { ...options , live : true } , adminSession )
7575
7676 // Then
77- expect ( themeUpdate ) . toBeCalledWith ( theme1 . id , { name : options . newName } , adminSession )
77+ expect ( themeUpdate ) . toBeCalledWith ( theme1 . id , { name : options . name } , adminSession )
7878 expect ( renderSuccess ) . toBeCalledWith ( {
7979 body : [ 'The theme' , "'live theme'" , { subdued : '(#2)' } , 'was renamed to' , "'Renamed Theme'" ] ,
8080 } )
0 commit comments