@@ -105,18 +105,18 @@ func TestManifestToHash(t *testing.T) {
105105 }
106106}
107107
108- func TestNewAppStoreOptions (t * testing.T ) {
108+ func TestNewAppStoreConnectOptions (t * testing.T ) {
109109 t .Log ("create app-store type export options with default values" )
110110 {
111- options := NewAppStoreOptions ( )
111+ options := NewAppStoreConnectOptions ( MethodAppStoreConnect )
112112 require .Equal (t , UploadBitcodeDefault , options .UploadBitcode )
113113 require .Equal (t , UploadSymbolsDefault , options .UploadSymbols )
114114 require .Equal (t , TestFlightInternalTestingOnlyDefault , options .TestFlightInternalTestingOnly )
115115 }
116116}
117117
118118func TestAppStoreOptionsToHash (t * testing.T ) {
119- t .Log ("default app-store type options creates hash with method" )
119+ t .Log ("default app-store type options creates hash with legacy method" )
120120 {
121121 options := NewAppStoreOptions ()
122122 options .ManageAppVersion = true
@@ -130,6 +130,20 @@ func TestAppStoreOptionsToHash(t *testing.T) {
130130 }
131131 }
132132
133+ t .Log ("default app-store type options creates hash with new method" )
134+ {
135+ options := NewAppStoreConnectOptions (MethodAppStoreConnect )
136+ options .ManageAppVersion = true
137+ hash := options .Hash ()
138+ require .Equal (t , 1 , len (hash ), fmt .Sprintf ("Hash: %+v" , hash ))
139+
140+ {
141+ value , ok := hash [MethodKey ]
142+ require .Equal (t , true , ok )
143+ require .Equal (t , MethodAppStoreConnect , value )
144+ }
145+ }
146+
133147 t .Log ("custom app-store type option's generated hash contains all properties" )
134148 {
135149 options := NewAppStoreOptions ()
@@ -182,7 +196,7 @@ func TestAppStoreOptionsWriteToFile(t *testing.T) {
182196 require .NoError (t , err )
183197 pth := filepath .Join (tmpDir , "exportOptions.plist" )
184198
185- options := NewAppStoreOptions ( )
199+ options := NewAppStoreConnectOptions ( MethodAppStoreConnect )
186200 options .ManageAppVersion = true
187201 require .NoError (t , options .WriteToFile (pth ))
188202
@@ -193,7 +207,7 @@ func TestAppStoreOptionsWriteToFile(t *testing.T) {
193207<plist version="1.0">
194208 <dict>
195209 <key>method</key>
196- <string>app-store</string>
210+ <string>app-store-connect </string>
197211 </dict>
198212</plist>`
199213 require .Equal (t , desired , content )
0 commit comments