You need to sign in to do that
Don't have an account?
How to cover logic for enforcing FLS in test class for lightning controller.
How to test code for enforcing FLS.
I have a test class that only has 75% coverage. I need to test for when the user does not have Read access to Client_Strategy__c custom field in FLS and I also need to Cover 'Catch'.

Test Class:
I have a test class that only has 75% coverage. I need to test for when the user does not have Read access to Client_Strategy__c custom field in FLS and I also need to Cover 'Catch'.
Test Class:
@isTest public class CI_ClientOverviewControllerTest { @testSetup static void setupTestData() { List<Account> client = new List<Account>(); client.add(new Account(Name= 'Google Inc',Client_Strategy__c = 'Strategy for the client')); insert client; } public static testMethod void PositiveTest(){ setupTestData(); List<Account> client = [select id from Account where name ='Google Inc']; CI_ClientOverviewController.getBankStrategy(client[0].id); } }Any Ideas?