-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable rollup bypass via Custom Setting, Dev API, or per-rollup Cust …
…Perm
- Loading branch information
Showing
17 changed files
with
268 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@IsTest | ||
public class RollupSummaryTest { | ||
@IsTest | ||
static void testBypassCustPermApiName() { | ||
LookupRollupSummary2__mdt rollup = new LookupRollupSummary2__mdt(); | ||
rollup.BypassPermissionApiName__c = null; | ||
RollupSummary rs = new RollupSummary(rollup); | ||
Assert.areEqual(null, rs.BypassCustPermApiName); | ||
rollup.BypassPermissionApiName__c = 'Rollup1'; | ||
rs = new RollupSummary(rollup); | ||
Assert.areEqual('Rollup1', rs.BypassCustPermApiName); | ||
|
||
rs.BypassCustPermApiName = 'Rollup2'; | ||
Assert.areEqual('Rollup2', rs.BypassCustPermApiName); | ||
|
||
LookupRollupSummary__c rollupCO = new LookupRollupSummary__c(); | ||
rs = new RollupSummary(rollupCO); | ||
Assert.areEqual(null, rs.BypassCustPermApiName); | ||
rs.BypassCustPermApiName = 'Rollup1'; | ||
// we're not building support in the Custom Object rollup versions, setting the value is ignored | ||
Assert.areEqual(null, rs.BypassCustPermApiName); | ||
} | ||
} |
Oops, something went wrong.