diff --git a/dlrs/main/classes/RollupCalculateJobTest.cls b/dlrs/main/classes/RollupCalculateJobTest.cls index d125b95c..e6a6ab84 100644 --- a/dlrs/main/classes/RollupCalculateJobTest.cls +++ b/dlrs/main/classes/RollupCalculateJobTest.cls @@ -263,7 +263,11 @@ private class RollupCalculateJobTest { String jobId; System.runAs(new User(Id = UserInfo.getUserId())) { Test.startTest(); - Assert.isTrue(FeatureManagement.checkPermission(permName)); + Assert.areEqual( + true, + Utilities.userHasCustomPermission(permName), + 'Expected user to have ' + permName + ); // go into runAs because we need to get the perms recalculated jobId = Database.executeBatch(job); Test.stopTest(); diff --git a/dlrs/main/classes/RollupJobTest.cls b/dlrs/main/classes/RollupJobTest.cls index a24f730b..3768be3e 100644 --- a/dlrs/main/classes/RollupJobTest.cls +++ b/dlrs/main/classes/RollupJobTest.cls @@ -253,9 +253,10 @@ private class RollupJobTest { String jobId; System.runAs(new User(Id = UserInfo.getUserId())) { Test.startTest(); - Assert.isTrue( - FeatureManagement.checkPermission(permName), - 'Expected user to have the ' + permName + ' permission set' + Assert.areEqual( + true, + Utilities.userHasCustomPermission(permName), + 'Expected user to have ' + permName ); // go into runAs because we need to get the perms recalculated jobId = Database.executeBatch(new RollupJob());