You need to sign in to do that
Don't have an account?

Test partner or portal accounts having lightning components?
Hi Team,
I have an Apex code which used below SOQL,
How do I create a Test Class and test it?
Also, it has lightning components, how do I test it?
I have an Apex code which used below SOQL,
ID cUID= UserInfo.getUserId() ; User cU= [Select id, Name, ContactId from User where id = :cUID limit 1]; Contact cC= [Select id, Name, AccountId, Account.name from Contact where id = :cU.ContactId limit 1]; ID accountId = cC.AccountId;The ContactId will have a value only for users who are enabled for Partner or Customer Portal accounts.
How do I create a Test Class and test it?
Also, it has lightning components, how do I test it?
@isTest(SeeAllData=true)