+ Start a Discussion
KapavariVenkatramanaKapavariVenkatramana 

Please Solution needed to  Unit Testing on the Lightning Platform  Write Permission-Based Tests

Please Solution needed to 
Unit Testing on the Lightning Platform 
Write Permission-Based Tests

YOUR CHALLENGE
Create a permission-based test
Create a Custom User profile in your Trailhead Playground and give it View All permission on Private_object__c records. Write a positive permission test demonstrating that users with the Custom User profile can view records that they don’t own. 
To get started
In Setup, clone the Custom: Support Profile profile and name it ‘Custom User’.
Give the Custom User profile View All permissions on the custom object Private_Object__c. (Listed as Private Objects in the user interface)
Create a new test class named PositivePermission_tests
Write a positive permission unit test showing that users with the Custom User profile can access Private_Object__c records that they do not own
Execute your unit tests and ensure that they all pass