diff --git a/dlrs/main/classes/RollupController.cls b/dlrs/main/classes/RollupController.cls
index ca05a24f..2eebad87 100644
--- a/dlrs/main/classes/RollupController.cls
+++ b/dlrs/main/classes/RollupController.cls
@@ -28,7 +28,8 @@
* Handles the Manage Trigger and Calculate Custom Buttons
**/
public with sharing class RollupController {
- public static String DEF_API_VERSION = '58.0';
+ @TestVisible
+ private static String FALLBACK_COMPONENT_API_VERSION = '58.0';
public String ZipData { get; set; }
@@ -59,10 +60,12 @@ public with sharing class RollupController {
public ApexClass RollupParentTriggerTest { get; private set; }
public Integer deployCount;
- public String apiVersion;
public Boolean MetadataConnectionError { get; set; }
+ @TestVisible
+ private String componentApiVersion;
+
public RollupController(ApexPages.StandardController standardController) {
// Query Lookup Rollup Summary record
this(
@@ -101,7 +104,7 @@ public with sharing class RollupController {
return '' +
'' +
'' +
- apiVersion +
+ componentApiVersion +
'' +
'';
else
@@ -135,7 +138,7 @@ public with sharing class RollupController {
'')
: '') +
'' +
- apiVersion +
+ componentApiVersion +
'' +
'';
}
@@ -170,7 +173,7 @@ public with sharing class RollupController {
'')
: '') +
'' +
- apiVersion +
+ componentApiVersion +
'' +
'';
}
@@ -183,7 +186,7 @@ public with sharing class RollupController {
return '' +
'' +
'' +
- apiVersion +
+ componentApiVersion +
'' +
'Active' +
'';
@@ -228,7 +231,7 @@ public with sharing class RollupController {
return '' +
'' +
'' +
- apiVersion +
+ componentApiVersion +
'' +
'Active' +
'';
@@ -269,7 +272,7 @@ public with sharing class RollupController {
return '' +
'' +
'' +
- apiVersion +
+ componentApiVersion +
'' +
'Active' +
'';
@@ -316,7 +319,7 @@ public with sharing class RollupController {
return '' +
'' +
'' +
- apiVersion +
+ componentApiVersion +
'' +
'Active' +
'';
@@ -493,7 +496,7 @@ public with sharing class RollupController {
);
return;
}
- apiVersion = getNewestApiVersion();
+ componentApiVersion = getNewestApiVersion();
// Already deployed?
Set triggerNames = new Set{ RollupTriggerName };
@@ -602,11 +605,11 @@ public with sharing class RollupController {
Http http = new Http();
HTTPResponse res = http.send(req);
if (res.getStatusCode() != 200) {
- return DEF_API_VERSION;
+ return FALLBACK_COMPONENT_API_VERSION;
}
String body = res.getBody();
List