Skip to content

Commit

Permalink
Fixing TestDataFactory method to resolve Code Analyzer issue (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
kryvyifedir authored Apr 21, 2024
1 parent 747dae5 commit f1f6eed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions force-app/main/default/classes/TestDataFactory.cls
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ public class TestDataFactory {

public static void assignPermissionSet(Id userId, String psName) {
PermissionSet ps = [SELECT Id FROM PermissionSet WHERE Name = :psName];
PermissionSetAssignment assignment = new PermissionSetAssignment();
assignment.AssigneeId = userId;
assignment.PermissionSetId= ps.Id;
insert assignment;
insert new PermissionSetAssignment(
AssigneeId = userId,
PermissionSetId = ps.Id
);
}
}

0 comments on commit f1f6eed

Please sign in to comment.