@@ -83,15 +83,17 @@ exports.UpdateCheckRequestMock = UpdateCheckRequestMock;
8383 */
8484function createDefaultResponse ( ) {
8585 var defaultResponse = new CheckForUpdateResponseMock ( ) ;
86- defaultResponse . downloadURL = "" ;
86+ defaultResponse . download_url = "" ;
87+ defaultResponse . is_disabled = false ;
8788 defaultResponse . description = "" ;
88- defaultResponse . isAvailable = false ;
89- defaultResponse . isMandatory = false ;
90- defaultResponse . appVersion = "" ;
91- defaultResponse . packageHash = "" ;
89+ defaultResponse . is_available = false ;
90+ defaultResponse . is_mandatory = false ;
91+ defaultResponse . target_binary_range = "" ;
92+ defaultResponse . package_hash = "" ;
9293 defaultResponse . label = "" ;
93- defaultResponse . packageSize = 0 ;
94- defaultResponse . updateAppVersion = false ;
94+ defaultResponse . package_size = 0 ;
95+ defaultResponse . should_run_binary_version = false ;
96+ defaultResponse . update_app_version = false ;
9597 return defaultResponse ;
9698}
9799exports . createDefaultResponse = createDefaultResponse ;
@@ -102,19 +104,21 @@ function createUpdateResponse(mandatory, targetPlatform, randomHash) {
102104 if ( mandatory === void 0 ) { mandatory = false ; }
103105 if ( randomHash === void 0 ) { randomHash = true ; }
104106 var updateResponse = new CheckForUpdateResponseMock ( ) ;
105- updateResponse . isAvailable = true ;
106- updateResponse . appVersion = "1.0.0" ;
107- updateResponse . downloadURL = "mock.url/download" ;
108- updateResponse . isMandatory = mandatory ;
107+ updateResponse . is_available = true ;
108+ updateResponse . is_disabled = false ;
109+ updateResponse . target_binary_range = "1.0.0" ;
110+ updateResponse . download_url = "mock.url/v0.1/public/codepush/report_status/download" ;
111+ updateResponse . is_mandatory = mandatory ;
109112 updateResponse . label = "mock-update" ;
110- updateResponse . packageHash = "12345-67890" ;
111- updateResponse . packageSize = 12345 ;
112- updateResponse . updateAppVersion = false ;
113+ updateResponse . package_hash = "12345-67890" ;
114+ updateResponse . package_size = 12345 ;
115+ updateResponse . should_run_binary_version = false ;
116+ updateResponse . update_app_version = false ;
113117 if ( ! ! targetPlatform )
114- updateResponse . downloadURL = targetPlatform . getServerUrl ( ) + "/download" ;
118+ updateResponse . download_url = targetPlatform . getServerUrl ( ) + "/v0.1/public/codepush/report_status /download" ;
115119 // We need unique hashes to avoid conflicts.
116120 if ( randomHash ) {
117- updateResponse . packageHash = "randomHash-" + Math . floor ( Math . random ( ) * 10000 ) ;
121+ updateResponse . package_hash = "randomHash-" + Math . floor ( Math . random ( ) * 10000 ) ;
118122 }
119123 return updateResponse ;
120124}
0 commit comments